diff options
| author | Igor Minar | 2012-05-13 21:53:19 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-05-13 21:53:19 -0700 | 
| commit | 679cb8a74a684454fe38fa9e1ddad396bb598c52 (patch) | |
| tree | f42ab8f443c8604d12f617dfd7fc6de8cbe44bc4 /test/ng/browserSpecs.js | |
| parent | 4e65635f85f83f3e92e279563bb4f26eb05eb02e (diff) | |
| download | angular.js-679cb8a74a684454fe38fa9e1ddad396bb598c52.tar.bz2 | |
fix($browser/$location): single quote in url causes infinite digest in FF
The real issue is in FF, see https://bugzilla.mozilla.org/show_bug.cgi?id=407172.
FF overly encodes stuff which breaks our expectations and then we fail .url() != currentUrl.absUrl()
comparison unexpectidly, which leads to infinite digest.
The workaround is to correct for this inconsistency in $browser and decode any single quotes in urls.
Closes #920
Diffstat (limited to 'test/ng/browserSpecs.js')
| -rw-r--r-- | test/ng/browserSpecs.js | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/test/ng/browserSpecs.js b/test/ng/browserSpecs.js index bd3feed7..55b8167c 100644 --- a/test/ng/browserSpecs.js +++ b/test/ng/browserSpecs.js @@ -462,6 +462,12 @@ describe('browser', function() {      it('should return $browser to allow chaining', function() {        expect(browser.url('http://any.com')).toBe(browser);      }); + + +    it('should decode single quotes to work around FF bug 407273', function() { +      fakeWindow.location.href = "http://ff-bug/?single%27quote"; +      expect(browser.url()).toBe("http://ff-bug/?single'quote"); +    });    });    describe('urlChange', function() { | 
