File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -335,17 +335,17 @@ describe('browser', function(){
335
335
it ( 'should log warnings when 4kb per cookie storage limit is reached' , function ( ) {
336
336
var i , longVal = '' , cookieStr ;
337
337
338
- for ( i = 0 ; i < 4092 ; i ++ ) {
338
+ for ( i = 0 ; i < 4091 ; i ++ ) {
339
339
longVal += '+' ;
340
340
}
341
341
342
342
cookieStr = document . cookie ;
343
- browser . cookies ( 'x' , longVal ) ; //total size 4094 -4096, so it should go through
343
+ browser . cookies ( 'x' , longVal ) ; //total size 4093 -4096, so it should go through
344
344
expect ( document . cookie ) . not . toEqual ( cookieStr ) ;
345
345
expect ( browser . cookies ( ) [ 'x' ] ) . toEqual ( longVal ) ;
346
346
expect ( logs . warn ) . toEqual ( [ ] ) ;
347
347
348
- browser . cookies ( 'x' , longVal + 'xxx ' ) ; //total size 4097-4099, a warning should be logged
348
+ browser . cookies ( 'x' , longVal + 'xxxx ' ) ; //total size 4097-4099, a warning should be logged
349
349
expect ( logs . warn ) . toEqual (
350
350
[ [ "Cookie 'x' possibly not set or overflowed because it was too large (4097 > 4096 " +
351
351
"bytes)!" ] ] ) ;
You can’t perform that action at this time.
0 commit comments