aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
authorIgor Minar2012-05-11 23:56:37 -0700
committerIgor Minar2012-05-14 14:45:56 -0700
commitc1533ef5762199bea18d3bf3bcba7fcf89272931 (patch)
tree18388c49ce698e26501c156b619142c0ba51d9a1 /test/ng
parent679cb8a74a684454fe38fa9e1ddad396bb598c52 (diff)
downloadangular.js-c1533ef5762199bea18d3bf3bcba7fcf89272931.tar.bz2
fix($location): support urls with any protocol
The url used for location parsing was quite strict and did not support custom url schemes like "chrome-extension://". With this change the only requirement for scheme is that it doesn't contain ":" character.
Diffstat (limited to 'test/ng')
-rw-r--r--test/ng/locationSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js
index 648fa42d..b866b1e3 100644
--- a/test/ng/locationSpec.js
+++ b/test/ng/locationSpec.js
@@ -632,6 +632,17 @@ describe('$location', function() {
expect(match[10]).toBe('?book=moby');
});
+
+
+ it('should parse chrome extension urls', function() {
+ var match = URL_MATCH.exec('chrome-extension://jjcldkdmokihdaomalanmlohibnoplog/index.html?foo#bar');
+
+ expect(match[1]).toBe('chrome-extension');
+ expect(match[3]).toBe('jjcldkdmokihdaomalanmlohibnoplog');
+ expect(match[6]).toBe('/index.html');
+ expect(match[8]).toBe('foo');
+ expect(match[10]).toBe('bar');
+ });
});