diff --git a/karma-shared.conf.js b/karma-shared.conf.js
index 88138cc8e606..1fcf53d4a4d6 100644
--- a/karma-shared.conf.js
+++ b/karma-shared.conf.js
@@ -74,6 +74,12 @@ module.exports = function(config, specificOptions) {
platform: 'Windows 8.1',
version: '11'
},
+ 'SL_EDGE': {
+ base: 'SauceLabs',
+ browserName: 'microsoftedge',
+ platform: 'Windows 10',
+ version: '14'
+ },
'SL_iOS': {
base: 'SauceLabs',
browserName: 'iphone',
@@ -120,6 +126,13 @@ module.exports = function(config, specificOptions) {
os: 'Windows',
os_version: '8.1'
},
+ 'BS_EDGE': {
+ base: 'BrowserStack',
+ browser: 'edge',
+ browser_version: '14',
+ os: 'Windows',
+ os_version: '10'
+ },
'BS_iOS_8': {
base: 'BrowserStack',
device: 'iPhone 6',
diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh
index bc2b6635a1db..c193039bc02d 100755
--- a/scripts/travis/build.sh
+++ b/scripts/travis/build.sh
@@ -9,9 +9,9 @@ if [ "$JOB" == "ci-checks" ]; then
grunt ci-checks
elif [ "$JOB" == "unit" ]; then
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
- BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_iOS_8,BS_iOS_9"
+ BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9"
else
- BROWSERS="SL_Chrome,SL_Firefox,SL_Safari_8,SL_Safari_9,SL_IE_9,SL_IE_10,SL_IE_11,SL_iOS"
+ BROWSERS="SL_Chrome,SL_Firefox,SL_Safari_8,SL_Safari_9,SL_IE_9,SL_IE_10,SL_IE_11,SL_EDGE,SL_iOS"
fi
grunt test:promises-aplus
diff --git a/test/AngularSpec.js b/test/AngularSpec.js
index 5e9ef2167429..4b6610527c7c 100644
--- a/test/AngularSpec.js
+++ b/test/AngularSpec.js
@@ -1755,8 +1755,7 @@ describe('angular', function() {
};
}
- it('should bootstrap from an extension into an extension document for same-origin documents only', function() {
-
+ describe('from extensions into extension documents', function() {
// Extension URLs are browser-specific, so we must choose a scheme that is supported by the browser to make
// sure that the URL is properly parsed.
var protocol;
@@ -1773,10 +1772,29 @@ describe('angular', function() {
protocol = 'browserext:'; // Upcoming standard scheme.
}
- expect(allowAutoBootstrap(createFakeDoc({src: protocol + '//something'}, protocol))).toBe(true);
- expect(allowAutoBootstrap(createFakeDoc({src: protocol + '//something-else'}, protocol))).toBe(false);
+
+ if (protocol === 'ms-browser-extension:') {
+ // Support: Edge 13-15
+ // In Edge, URLs with protocol 'ms-browser-extension:' return "null" for the origin,
+ // therefore it's impossible to know if a script is same-origin.
+ it('should not bootstrap for same-origin documents', function() {
+ expect(allowAutoBootstrap(createFakeDoc({src: protocol + '//something'}, protocol))).toBe(false);
+ });
+
+ } else {
+ it('should bootstrap for same-origin documents', function() {
+
+ expect(allowAutoBootstrap(createFakeDoc({src: protocol + '//something'}, protocol))).toBe(true);
+ });
+ }
+
+ it('should not bootstrap for cross-origin documents', function() {
+ expect(allowAutoBootstrap(createFakeDoc({src: protocol + '//something-else'}, protocol))).toBe(false);
+ });
+
});
+
it('should bootstrap from a script with no source (e.g. src, href or xlink:href attributes)', function() {
expect(allowAutoBootstrap(createFakeDoc({src: null}))).toBe(true);
diff --git a/test/ng/animateRunnerSpec.js b/test/ng/animateRunnerSpec.js
index cd3ddea7f33d..601d3fba3427 100644
--- a/test/ng/animateRunnerSpec.js
+++ b/test/ng/animateRunnerSpec.js
@@ -329,7 +329,7 @@ describe('$$AnimateRunner', function() {
expect(status).toBe(true);
}));
- it('should break the chian when a function evaluates to false',
+ it('should break the chain when a function evaluates to false',
inject(function($$rAF, $$AnimateRunner) {
var runner1 = new $$AnimateRunner();
diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js
index 7014e00624d2..b29fba489fe5 100644
--- a/test/ng/directive/inputSpec.js
+++ b/test/ng/directive/inputSpec.js
@@ -5,6 +5,9 @@
describe('input', function() {
var helper = {}, $compile, $rootScope, $browser, $sniffer, $timeout, $q;
+ // UA sniffing to exclude Edge from some date input tests
+ var isEdge = /\bEdge\//.test(window.navigator.userAgent);
+
generateInputCompilerHelper(helper);
beforeEach(inject(function(_$compile_, _$rootScope_, _$browser_, _$sniffer_, _$timeout_, _$q_) {
@@ -688,18 +691,20 @@ describe('input', function() {
expect($rootScope.form.alias.$error.month).toBeTruthy();
});
- it('should allow four or more digits in year', function() {
- var inputElm = helper.compileInput('');
- helper.changeInputValueTo('10123-03');
- expect(+$rootScope.value).toBe(Date.UTC(10123, 2, 1, 0, 0, 0));
+ if (!isEdge) {
+ it('should allow four or more digits in year', function() {
+ var inputElm = helper.compileInput('');
- $rootScope.$apply(function() {
- $rootScope.value = new Date(Date.UTC(20456, 3, 1, 0, 0, 0));
- });
- expect(inputElm.val()).toBe('20456-04');
- });
+ helper.changeInputValueTo('10123-03');
+ expect(+$rootScope.value).toBe(Date.UTC(10123, 2, 1, 0, 0, 0));
+ $rootScope.$apply(function() {
+ $rootScope.value = new Date(Date.UTC(20456, 3, 1, 0, 0, 0));
+ });
+ expect(inputElm.val()).toBe('20456-04');
+ });
+ }
it('should only change the month of a bound date', function() {
var inputElm = helper.compileInput('');
@@ -899,17 +904,19 @@ describe('input', function() {
expect(inputElm).toBeValid();
});
- it('should allow four or more digits in year', function() {
- var inputElm = helper.compileInput('');
+ if (!isEdge) {
+ it('should allow four or more digits in year', function() {
+ var inputElm = helper.compileInput('');
- helper.changeInputValueTo('10123-W03');
- expect(+$rootScope.value).toBe(Date.UTC(10123, 0, 21));
+ helper.changeInputValueTo('10123-W03');
+ expect(+$rootScope.value).toBe(Date.UTC(10123, 0, 21));
- $rootScope.$apply(function() {
- $rootScope.value = new Date(Date.UTC(20456, 0, 28));
+ $rootScope.$apply(function() {
+ $rootScope.value = new Date(Date.UTC(20456, 0, 28));
+ });
+ expect(inputElm.val()).toBe('20456-W04');
});
- expect(inputElm.val()).toBe('20456-W04');
- });
+ }
it('should use UTC if specified in the options', function() {
var inputElm = helper.compileInput('');
@@ -1195,18 +1202,22 @@ describe('input', function() {
expect(+$rootScope.value).toBe(+new Date(2000, 0, 1, 1, 2, 0));
});
- it('should allow four or more digits in year', function() {
- var inputElm = helper.compileInput('');
- helper.changeInputValueTo('10123-01-01T01:02');
- expect(+$rootScope.value).toBe(+new Date(10123, 0, 1, 1, 2, 0));
+ if (!isEdge) {
+ it('should allow four or more digits in year', function() {
+ var inputElm = helper.compileInput('');
+
+ helper.changeInputValueTo('10123-01-01T01:02');
+ expect(+$rootScope.value).toBe(+new Date(10123, 0, 1, 1, 2, 0));
+
+ $rootScope.$apply(function() {
+ $rootScope.value = new Date(20456, 1, 1, 1, 2, 0);
+ });
+ expect(inputElm.val()).toBe('20456-02-01T01:02:00.000');
+ }
+ );
+ }
- $rootScope.$apply(function() {
- $rootScope.value = new Date(20456, 1, 1, 1, 2, 0);
- });
- expect(inputElm.val()).toBe('20456-02-01T01:02:00.000');
- }
- );
it('should label parse errors as `datetimelocal`', function() {
var inputElm = helper.compileInput('', {
@@ -1800,19 +1811,20 @@ describe('input', function() {
}
);
- it('should allow four or more digits in year', function() {
- var inputElm = helper.compileInput('');
-
- helper.changeInputValueTo('10123-01-01');
- expect(+$rootScope.value).toBe(Date.UTC(10123, 0, 1, 0, 0, 0));
+ if (!isEdge) {
+ it('should allow four or more digits in year', function() {
+ var inputElm = helper.compileInput('');
- $rootScope.$apply(function() {
- $rootScope.value = new Date(Date.UTC(20456, 1, 1, 0, 0, 0));
- });
- expect(inputElm.val()).toBe('20456-02-01');
- }
- );
+ helper.changeInputValueTo('10123-01-01');
+ expect(+$rootScope.value).toBe(Date.UTC(10123, 0, 1, 0, 0, 0));
+ $rootScope.$apply(function() {
+ $rootScope.value = new Date(Date.UTC(20456, 1, 1, 0, 0, 0));
+ });
+ expect(inputElm.val()).toBe('20456-02-01');
+ }
+ );
+ }
it('should label parse errors as `date`', function() {
var inputElm = helper.compileInput('', {
@@ -4224,10 +4236,14 @@ describe('input', function() {
});
expect(inputElm[0].value).toBe('');
- // Support: IE 9-11
+ // Support: IE 9-11, Edge
// In IE it is not possible to remove the `value` attribute from an input element.
- if (!msie) {
+ if (!msie && !isEdge) {
expect(inputElm[0].getAttribute('value')).toBeNull();
+ } else {
+ // Support: IE 9-11, Edge
+ // This will fail if the Edge bug gets fixed
+ expect(inputElm[0].getAttribute('value')).toBe('something');
}
});