Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions test/client/fixtures/core/array-utils-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
const hammerhead = window.getTestCafeModule('hammerhead');
const browserUtils = hammerhead.utils.browser;

const testCafeCore = window.getTestCafeModule('testCafeCore');
const arrayUtils = testCafeCore.arrayUtils;

Expand Down Expand Up @@ -139,11 +136,9 @@ test('isArray()', function () {
test('from()', function () {
deepEqual(arrayUtils.from('foo'), ['f', 'o', 'o']);

if (!browserUtils.isIE) {
deepEqual(arrayUtils.from(array, function (x) {
return x + x;
}), [2, 4, 6, 8, 10]);
}
deepEqual(arrayUtils.from(array, function (x) {
return x + x;
}), [2, 4, 6, 8, 10]);
});

test('find()', function () {
Expand Down
11 changes: 2 additions & 9 deletions test/client/fixtures/core/dom-utils-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
const hammerhead = window.getTestCafeModule('hammerhead');
const browserUtils = hammerhead.utils.browser;
const testCafeCore = window.getTestCafeModule('testCafeCore');
const domUtils = testCafeCore.domUtils;

asyncTest('isIFrameWindowInDOM', function () {
expect(browserUtils.isIE ? 2 : 1);
expect(1);

let messageCounter = 0;

Expand All @@ -17,15 +15,10 @@ asyncTest('isIFrameWindowInDOM', function () {
if (messageCounter === 0) {
equal(event.data, 'true');

const iFramePostMessage = iframe.contentWindow.postMessage.bind(iframe.contentWindow);

document.body.removeChild(iframe);

//NOTE: In WebKit, scripts cannot be executed in a removed iframe. Therefore, the test is finished here.
if (browserUtils.isIE)
iFramePostMessage('isIFrameWindowInDOM', '*');
else
finishTest();
finishTest();
}
else {
equal(event.data, 'false');
Expand Down
6 changes: 1 addition & 5 deletions test/client/fixtures/driver/script-execution-barrier-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,12 @@ $(document).ready(function () {
const emitter = new ScriptExecutionEmitter();
const barrier = new ScriptExecutionBarrier(emitter);

let scriptCounter = 0;

window.stopAppending = false;
window.appendCustomScript = function () {
const script = document.createElement('script');
const scriptContent = encodeURIComponent('if(!window.stopAppending)window.appendCustomScript()');

// HACK: we should request different URLs to avoid caching of response in IE 10
script.src = '/xhr-test/' + scriptCounter + '?expectedResponse=' + scriptContent;
scriptCounter++;
script.src = '/xhr-test/50?expectedResponse=' + scriptContent;

document.body.appendChild(script);
};
Expand Down