diff options
| author | Igor Minar | 2011-08-26 10:54:38 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-09-02 10:05:06 -0700 | 
| commit | ea8952177e31e0cebc77e0a9dd6b58104f3928c3 (patch) | |
| tree | c556a65372f5f3990d54d3c4ccdcf3a2f043f7f1 | |
| parent | 90ca6f983ea360cc016d6b4d056afeafed479c97 (diff) | |
| download | angular.js-ea8952177e31e0cebc77e0a9dd6b58104f3928c3.tar.bz2 | |
fix(test): improve $cookie service test to work with Safari 5.1
the max size for safari cookies has changed sligtly so I had to adjust
the test to make cookie creation fail on this browser
| -rw-r--r-- | test/BrowserSpecs.js | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js index 93882c1a..00469bf9 100644 --- a/test/BrowserSpecs.js +++ b/test/BrowserSpecs.js @@ -377,17 +377,17 @@ describe('browser', function(){        it('should log warnings when 4kb per cookie storage limit is reached', function() {          var i, longVal = '', cookieStr; -        for(i=0; i<4092; i++) { +        for(i=0; i<4091; i++) {            longVal += '+';          }          cookieStr = document.cookie; -        browser.cookies('x', longVal); //total size 4094-4096, so it should go through +        browser.cookies('x', longVal); //total size 4093-4096, so it should go through          expect(document.cookie).not.toEqual(cookieStr);          expect(browser.cookies()['x']).toEqual(longVal);          expect(logs.warn).toEqual([]); -        browser.cookies('x', longVal + 'xxx'); //total size 4097-4099, a warning should be logged +        browser.cookies('x', longVal + 'xxxx'); //total size 4097-4099, a warning should be logged          expect(logs.warn).toEqual(            [[ "Cookie 'x' possibly not set or overflowed because it was too large (4097 > 4096 " +               "bytes)!" ]]); | 
