From a22596c925a41c6f9b78cb21e18894987bbbc84b Mon Sep 17 00:00:00 2001 From: Chirayu Krishnappa Date: Fri, 28 Jun 2013 12:43:18 -0700 Subject: 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). --- test/ng/compileSpec.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') 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) { -- cgit v1.2.3