diff options
| author | Caitlin Potter | 2014-01-02 19:12:31 -0500 |
|---|---|---|
| committer | Igor Minar | 2014-01-02 16:36:31 -0800 |
| commit | 760f2fb73178e56c37397b3c5876f7dac96f0455 (patch) | |
| tree | 83927e139f2d3248b07d6a2eb62c53d2696b0713 /test | |
| parent | c9705b755645a4bfe066243f2ba15a733c3787e1 (diff) | |
| download | angular.js-760f2fb73178e56c37397b3c5876f7dac96f0455.tar.bz2 | |
fix($browser): remove base href domain when url begins with '//'
This change prevents an incorrect appBase url from being calculated when the
<base> href's domain begins with '//'.
Closes #5606
Diffstat (limited to 'test')
| -rwxr-xr-x | test/ng/browserSpecs.js | 5 |
1 files changed, 5 insertions, 0 deletions
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 <base href> beginning with \'//\'', function() { + fakeDocument.basePath = '//google.com/base/path/'; + expect(browser.baseHref()).toEqual('/base/path/'); + }); }); }); |
