Removed support for IE <10

[#150527985]
This commit is contained in:
Steve Gravrock
2017-11-07 21:03:38 -08:00
committed by Steve Gravrock
parent 1526d5e2a8
commit 419470e9df
15 changed files with 15 additions and 215 deletions

View File

@@ -156,8 +156,6 @@ describe("matchersUtil", function() {
});
it("passes for equivalent frozen objects (GitHub issue #266)", function() {
if (jasmine.getEnv().ieVersion < 9) { return; }
var a = { foo: 1 },
b = {foo: 1 };
@@ -191,10 +189,6 @@ describe("matchersUtil", function() {
if (isNotRunningInBrowser()) {
return;
}
// iframe.contentWindow.eval isn't supported in ie8
if (jasmine.getEnv().ieVersion < 9) {
return;
}
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
iframe.contentWindow.eval('window.testObject = {}');
@@ -356,8 +350,6 @@ describe("matchersUtil", function() {
});
it("passes for null prototype objects with same properties", function () {
if (jasmine.getEnv().ieVersion < 9) { return; }
var objA = Object.create(null),
objB = Object.create(null);
@@ -368,8 +360,6 @@ describe("matchersUtil", function() {
});
it("fails for null prototype objects with different properties", function () {
if (jasmine.getEnv().ieVersion < 9) { return; }
var objA = Object.create(null),
objB = Object.create(null);
@@ -449,9 +439,6 @@ describe("matchersUtil", function() {
});
describe("when running in an environment with array polyfills", function() {
// IE 8 doesn't support `definePropery` on non-DOM nodes
if (jasmine.getEnv().ieVersion < 9) { return; }
var findIndexDescriptor = Object.getOwnPropertyDescriptor(Array.prototype, 'findIndex');
if (!findIndexDescriptor) {
return;

View File

@@ -299,22 +299,7 @@ describe("toEqual", function() {
expect(compareEquals(actual, expected).message).toEqual(message);
});
function constructorIsNotEnumerable() {
// in IE8, the constructor property is not enumerable, even if it is an
// own property of the object.
// Objects that differ only by an own `constructor` property are thus
// considered equal in IE8.
for (var key in {constructor: 1}) {
return false;
}
return true;
}
it("reports mismatches between objects with their own constructor property", function () {
if (constructorIsNotEnumerable()) {
return;
}
function Foo() {}
function Bar() {}
@@ -326,10 +311,6 @@ describe("toEqual", function() {
});
it("reports mismatches between an object with a real constructor and one with its own constructor property", function () {
if (constructorIsNotEnumerable()) {
return;
}
function Foo() {}
function Bar() {}

View File

@@ -79,7 +79,7 @@ describe("toThrowError", function() {
});
it("passes if thrown is an instanceof Error regardless of global that contains its constructor", function() {
if (isNotRunningInBrowser() || jasmine.getEnv().phantomVersion < 2 || jasmine.getEnv().ieVersion < 10) {
if (isNotRunningInBrowser() || jasmine.getEnv().phantomVersion < 2) {
return;
}
@@ -92,7 +92,7 @@ describe("toThrowError", function() {
iframeDocument.body.appendChild(iframeDocument.createElement("script"))
.textContent = "function method() { throw new Error('foo'); }";
} else {
// older IE
// IE 10 and older
iframeDocument.write("<html><head><script>function method() { throw new Error('foo'); }</script></head></html>");
}