File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -377,17 +377,17 @@ describe('browser', function(){
377
377
it ( 'should log warnings when 4kb per cookie storage limit is reached' , function ( ) {
378
378
var i , longVal = '' , cookieStr ;
379
379
380
- for ( i = 0 ; i < 4092 ; i ++ ) {
380
+ for ( i = 0 ; i < 4091 ; i ++ ) {
381
381
longVal += '+' ;
382
382
}
383
383
384
384
cookieStr = document . cookie ;
385
- browser . cookies ( 'x' , longVal ) ; //total size 4094 -4096, so it should go through
385
+ browser . cookies ( 'x' , longVal ) ; //total size 4093 -4096, so it should go through
386
386
expect ( document . cookie ) . not . toEqual ( cookieStr ) ;
387
387
expect ( browser . cookies ( ) [ 'x' ] ) . toEqual ( longVal ) ;
388
388
expect ( logs . warn ) . toEqual ( [ ] ) ;
389
389
390
- browser . cookies ( 'x' , longVal + 'xxx ' ) ; //total size 4097-4099, a warning should be logged
390
+ browser . cookies ( 'x' , longVal + 'xxxx ' ) ; //total size 4097-4099, a warning should be logged
391
391
expect ( logs . warn ) . toEqual (
392
392
[ [ "Cookie 'x' possibly not set or overflowed because it was too large (4097 > 4096 " +
393
393
"bytes)!" ] ] ) ;
You can’t perform that action at this time.
0 commit comments