diff options
| author | Manuel Braun | 2013-03-07 13:36:38 +0100 |
|---|---|---|
| committer | Misko Hevery | 2013-03-15 21:19:58 -0700 |
| commit | a476972e2ebef5587cd3594a2d8f844e7b47b631 (patch) | |
| tree | 195c9521f055e3d5f36ff557afb5813f52f759cf /test | |
| parent | 866d3fb5736f71cda567087cdfb6baddbeb43dcc (diff) | |
| download | angular.js-a476972e2ebef5587cd3594a2d8f844e7b47b631.tar.bz2 | |
fix($location): parse FirefoxOS packaged app urls
FirefoxOS uses special URLs like
app://{d0419af1-8b42-41c5-96f4-ef4179e52315}/index.html for packaged Apps.
Closes #2112
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/locationSpec.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index c40d5323..bf91c250 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -676,6 +676,19 @@ describe('$location', function() { expect(match[8]).toBe('foo'); expect(match[10]).toBe('bar'); }); + + it('should parse FFOS app:// urls', function() { + var match = URL_MATCH.exec('app://{d0419af1-8b42-41c5-96f4-ef4179e52315}/path'); + + expect(match[1]).toBe('app'); + expect(match[3]).toBe('{d0419af1-8b42-41c5-96f4-ef4179e52315}'); + expect(match[5]).toBeFalsy(); + expect(match[6]).toBe('/path'); + expect(match[8]).toBeFalsy(); + + match = URL_MATCH.exec('app://}foo{') + expect(match).toBe(null); + }); }); |
