From 2ebeac318ea2f3ab22b35d525b06e55d7f2a47ae Mon Sep 17 00:00:00 2001 From: David Mark Date: Tue, 17 Jan 2017 02:04:41 -0500 Subject: [PATCH 1/2] Remove unneeded window reference The document object is global. --- src/Angular.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Angular.js b/src/Angular.js index d4088ad35227..a74674645eb2 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -206,7 +206,7 @@ var * documentMode is an IE-only property * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx */ -msie = window.document.documentMode; +msie = document.documentMode; /** From 6e41f09c05c86d01aec47d0a7ef6344f0d8f2ac1 Mon Sep 17 00:00:00 2001 From: David Mark Date: Tue, 17 Jan 2017 02:11:40 -0500 Subject: [PATCH 2/2] Removed UA sniff from unit test Can't rely on UA sniffing and certainly not in a unit test. Must fix the related code in AngularJS, rather than just skipping over the test based on the UA string. --- test/helpers/matchers.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/helpers/matchers.js b/test/helpers/matchers.js index 032f6760adc3..661f42e97962 100644 --- a/test/helpers/matchers.js +++ b/test/helpers/matchers.js @@ -369,8 +369,7 @@ beforeEach(function() { errors.push('Expected option property "selected" to be truthy'); } - // Support: IE 9 only - if (msie !== 9 && actual.hasAttribute('selected') === false) { + if (actual.hasAttribute('selected') === false) { errors.push('Expected option to have attribute "selected"'); } @@ -388,7 +387,7 @@ beforeEach(function() { } // Support: IE 9 only - if (msie !== 9 && actual.hasAttribute('selected')) { + if (actual.hasAttribute('selected')) { errors.push('Expected option not to have attribute "selected"'); }