feat: drop support for IE9

This commit is contained in:
Niklas von Hertzen 2021-08-09 18:31:10 +08:00
parent e429e0443a
commit eca5033705
6 changed files with 24 additions and 43 deletions

View File

@ -117,9 +117,6 @@ jobs:
name: iOS Simulator Safari 15 name: iOS Simulator Safari 15
targetBrowser: Safari_IOS_15 targetBrowser: Safari_IOS_15
xcode: /Applications/Xcode_13.0.app xcode: /Applications/Xcode_13.0.app
- os: windows-latest
name: Windows Internet Explorer 9 (Emulated)
targetBrowser: IE_9
- os: windows-latest - os: windows-latest
name: Windows Internet Explorer 10 (Emulated) name: Windows Internet Explorer 10 (Emulated)
targetBrowser: IE_10 targetBrowser: IE_10

View File

@ -28,7 +28,8 @@ The library should work fine on the following browsers (with `Promise` polyfill)
* Firefox 3.5+ * Firefox 3.5+
* Google Chrome * Google Chrome
* Opera 12+ * Opera 12+
* IE9+ * IE10+
* Edge
* Safari 6+ * Safari 6+
As each CSS property needs to be manually built to be supported, there are a number of properties that are not yet supported. As each CSS property needs to be manually built to be supported, there are a number of properties that are not yet supported.

View File

@ -37,6 +37,6 @@ The library should work fine on the following browsers (with `Promise` polyfill)
- Firefox 3.5+ - Firefox 3.5+
- Google Chrome - Google Chrome
- Opera 12+ - Opera 12+
- IE9+ - IE10+
- Edge - Edge
- Safari 6+ - Safari 6+

View File

@ -48,12 +48,6 @@ module.exports = function(config) {
platform: 'iOS', platform: 'iOS',
sdk: '15.0' sdk: '15.0'
}, },
SauceLabs_IE9: {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '9.0',
platform: 'Windows 7'
},
SauceLabs_IE10: { SauceLabs_IE10: {
base: 'SauceLabs', base: 'SauceLabs',
browserName: 'internet explorer', browserName: 'internet explorer',
@ -93,11 +87,6 @@ module.exports = function(config) {
version: '9.3', version: '9.3',
device: 'iPhone 6 Plus Simulator' device: 'iPhone 6 Plus Simulator'
}, },
IE_9: {
base: 'IE',
'x-ua-compatible': 'IE=EmulateIE9',
flags: ['-extoff']
},
IE_10: { IE_10: {
base: 'IE', base: 'IE',
'x-ua-compatible': 'IE=EmulateIE10', 'x-ua-compatible': 'IE=EmulateIE10',

View File

@ -12,7 +12,6 @@ export class CacheStorage {
} }
link.href = url; link.href = url;
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
return link.protocol + link.hostname + link.port; return link.protocol + link.hostname + link.port;
} }

View File

@ -8,15 +8,14 @@ import {ScreenshotRequest} from './types';
// @ts-ignore // @ts-ignore
window.Promise = Promise; window.Promise = Promise;
const testRunnerUrl = location.href; const testRunnerUrl = location.href;
const hasHistoryApi = typeof window.history !== 'undefined' && typeof window.history.replaceState !== 'undefined';
const uploadResults = (canvas: HTMLCanvasElement, url: string) => { const uploadResults = (canvas: HTMLCanvasElement, url: string) => {
return new Promise((resolve: () => void, reject: (error: string) => void) => { // @ts-ignore
// @ts-ignore return new Promise((resolve: () => void, reject: (error: any) => void) => {
const xhr = 'withCredentials' in new XMLHttpRequest() ? new XMLHttpRequest() : new XDomainRequest(); const xhr = new XMLHttpRequest();
xhr.onload = () => { xhr.onload = () => {
if (typeof xhr.status !== 'number' || xhr.status === 200) { if (xhr.status === 200) {
resolve(); resolve();
} else { } else {
reject(`Failed to send screenshot with status ${xhr.status}`); reject(`Failed to send screenshot with status ${xhr.status}`);
@ -62,21 +61,17 @@ testList
testContainer.onload = () => done(); testContainer.onload = () => done();
testContainer.src = url + '?selenium&run=false&reftest&' + Math.random(); testContainer.src = url + '?selenium&run=false&reftest&' + Math.random();
if (hasHistoryApi) { // Chrome does not resolve relative background urls correctly inside of a nested iframe
// Chrome does not resolve relative background urls correctly inside of a nested iframe try {
try { history.replaceState(null, '', url);
history.replaceState(null, '', url); } catch (e) {}
} catch (e) {}
}
document.body.appendChild(testContainer); document.body.appendChild(testContainer);
}); });
after(() => { after(() => {
if (hasHistoryApi) { try {
try { history.replaceState(null, '', testRunnerUrl);
history.replaceState(null, '', testRunnerUrl); } catch (e) {}
} catch (e) {}
}
document.body.removeChild(testContainer); document.body.removeChild(testContainer);
}); });