aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChirayu Krishnappa2013-06-28 12:43:18 -0700
committerChirayu Krishnappa2013-06-28 17:38:11 -0700
commita22596c925a41c6f9b78cb21e18894987bbbc84b (patch)
tree2b1b36b6be2b64a57260c83901d0c98e4bebe613 /test
parent0e254cc88c9ece7e4d4343aee00cd49efcba40ef (diff)
downloadangular.js-a22596c925a41c6f9b78cb21e18894987bbbc84b.tar.bz2
test($compile): use FQDN for img[src]
img[src]="https://foo" has the unfortunate problem that the browser will actually try retrieving the resource the non FQDN foo. The local DNS might suffix a domain to this, resolve it, and try to present a certificate for the https request and prompt the user to pick a certificate. This commit avoids that by making foo a FQDN. Note that it might be better to replace foo with example.com (ref http://tools.ietf.org/html/rfc2606#section-3).
Diffstat (limited to 'test')
-rwxr-xr-xtest/ng/compileSpec.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js
index 0ef7e8bf..d9480130 100755
--- a/test/ng/compileSpec.js
+++ b/test/ng/compileSpec.js
@@ -2620,21 +2620,21 @@ describe('$compile', function() {
$rootScope.$apply();
expect(element.attr('src')).toBe('#foo');
- $rootScope.testUrl = "http://foo/bar";
+ $rootScope.testUrl = "http://foo.com/bar";
$rootScope.$apply();
- expect(element.attr('src')).toBe('http://foo/bar');
+ expect(element.attr('src')).toBe('http://foo.com/bar');
- $rootScope.testUrl = " http://foo/bar";
+ $rootScope.testUrl = " http://foo.com/bar";
$rootScope.$apply();
- expect(element.attr('src')).toBe(' http://foo/bar');
+ expect(element.attr('src')).toBe(' http://foo.com/bar');
- $rootScope.testUrl = "https://foo/bar";
+ $rootScope.testUrl = "https://foo.com/bar";
$rootScope.$apply();
- expect(element.attr('src')).toBe('https://foo/bar');
+ expect(element.attr('src')).toBe('https://foo.com/bar');
- $rootScope.testUrl = "ftp://foo/bar";
+ $rootScope.testUrl = "ftp://foo.com/bar";
$rootScope.$apply();
- expect(element.attr('src')).toBe('ftp://foo/bar');
+ expect(element.attr('src')).toBe('ftp://foo.com/bar');
// Fails on IE < 10 with "TypeError: Access is denied" when trying to set img[src]
if (!msie || msie > 10) {