From ea296234377d76b9f9a46b294ea9de2b437aff37 Mon Sep 17 00:00:00 2001 From: LavrovArtem Date: Thu, 25 Jan 2018 10:33:13 +0300 Subject: [PATCH] 0.18.7-dev20180124 (close #1959) (#2068) * 0.18.7-dev20180124 * fix test --- package.json | 4 ++-- test/client/data/dom-utils/iframe.html | 2 +- test/client/fixtures/core/dom-utils-test.js | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8bed5f09269..8171ee55a64 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "testcafe", "description": "Automated browser testing for the modern web development stack.", "license": "MIT", - "version": "0.18.7-dev20180117", + "version": "0.18.7-dev20180124", "author": { "name": "Developer Express Inc.", "url": "https://www.devexpress.com/" @@ -102,7 +102,7 @@ "stack-chain": "^1.3.6", "strip-bom": "^2.0.0", "testcafe-browser-tools": "1.4.6", - "testcafe-hammerhead": "12.1.8", + "testcafe-hammerhead": "12.1.9", "testcafe-legacy-api": "3.1.4", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.1.0", diff --git a/test/client/data/dom-utils/iframe.html b/test/client/data/dom-utils/iframe.html index 243bba63ca5..57f9aebcd28 100644 --- a/test/client/data/dom-utils/iframe.html +++ b/test/client/data/dom-utils/iframe.html @@ -24,7 +24,7 @@ (function (isIFrameWindowInDOM, window, JSON) { window.addEventListener('message', function (event) { if (event.data === 'isIFrameWindowInDOM') - event.source.postMessage(JSON.stringify({ message: isIFrameWindowInDOM(window).toString() }), '*'); + event.source.postMessage({ message: isIFrameWindowInDOM(window).toString() }, '*'); }, false); })(testCafeCore.domUtils.isIFrameWindowInDOM, window, JSON); diff --git a/test/client/fixtures/core/dom-utils-test.js b/test/client/fixtures/core/dom-utils-test.js index e73e03ae087..49725436007 100644 --- a/test/client/fixtures/core/dom-utils-test.js +++ b/test/client/fixtures/core/dom-utils-test.js @@ -1,5 +1,6 @@ -var hammerhead = window.getTestCafeModule('hammerhead'); -var browserUtils = hammerhead.utils.browser; +var hammerhead = window.getTestCafeModule('hammerhead'); +var browserUtils = hammerhead.utils.browser; +var processScript = hammerhead.processScript; asyncTest('isIFrameWindowInDOM', function () { expect(browserUtils.isIE ? 2 : 1); @@ -13,7 +14,7 @@ asyncTest('isIFrameWindowInDOM', function () { function onMessage (event) { if (messageCounter === 0) { - equal(event.data, 'true'); + equal(eval(processScript('event.data')), 'true'); var iFramePostMessage = iframe.contentWindow.postMessage.bind(iframe.contentWindow);