Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKamaev committed Oct 17, 2018
1 parent 1512bd8 commit af7b854
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"source-map-support": "^0.5.5",
"strip-bom": "^2.0.0",
"testcafe-browser-tools": "1.6.5",
"testcafe-hammerhead": "14.3.0",
"testcafe-hammerhead": "14.3.1",
"testcafe-legacy-api": "3.1.8",
"testcafe-reporter-json": "^2.1.0",
"testcafe-reporter-list": "^2.1.0",
Expand Down
18 changes: 8 additions & 10 deletions test/client/fixtures/automation/regression-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,33 +339,31 @@ $(document).ready(function () {
});
});

asyncTest('B237672 - TesCafe throw exception "Access is denied" after trying to get content of iframe in IE browsers', function () {
let clicked = false;
asyncTest('B237672 - TesCafe does not throw exception "Access is denied" after trying to get content of iframe', function () {
let result = false;

const $iframe = $('<iframe></iframe>')
.width(500)
.height(500)
.attr('src', 'http://www.cross.domain.com')
.addClass(TEST_ELEMENT_CLASS)
.click(function () {
clicked = true;
});
.addClass(TEST_ELEMENT_CLASS);

window.QUnitGlobals.waitForIframe($iframe[0]).then(function () {
try {
//NOTE: for not ie
const iframeBody = $iframe[0].contentWindow.document;

nativeMethods.addEventListener.call(iframeBody, 'click', function () {
clicked = true;
throw new Error();
});

result = true;
}
catch (e) {
// do nothing
result = false;
}

runClickAutomation($iframe[0], {}, function () {
ok(clicked, 'click was raised');
ok(result);
startNext();
});
});
Expand Down

0 comments on commit af7b854

Please sign in to comment.