From 760f2fb73178e56c37397b3c5876f7dac96f0455 Mon Sep 17 00:00:00 2001
From: Caitlin Potter
Date: Thu, 2 Jan 2014 19:12:31 -0500
Subject: fix($browser): remove base href domain when url begins with '//'
This change prevents an incorrect appBase url from being calculated when the
href's domain begins with '//'.
Closes #5606
---
test/ng/browserSpecs.js | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'test/ng')
diff --git a/test/ng/browserSpecs.js b/test/ng/browserSpecs.js
index 6c6ac30e..4157ecbd 100755
--- a/test/ng/browserSpecs.js
+++ b/test/ng/browserSpecs.js
@@ -609,5 +609,10 @@ describe('browser', function() {
fakeDocument.basePath = 'http://host.com/base/path/index.html';
expect(browser.baseHref()).toEqual('/base/path/index.html');
});
+
+ it('should remove domain from beginning with \'//\'', function() {
+ fakeDocument.basePath = '//google.com/base/path/';
+ expect(browser.baseHref()).toEqual('/base/path/');
+ });
});
});
--
cgit v1.2.3