diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-06 14:31:20 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-06 14:31:20 +0200 |
commit | 4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005 (patch) | |
tree | ea479247696202858d088702ecd85b4163c4750a /editor/libeditor/tests/test_bug966552.html | |
parent | 7d5f95a8e57de5255ad2767342c1f2392b6f261f (diff) | |
download | UXP-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.tar UXP-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.tar.gz UXP-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.tar.lz UXP-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.tar.xz UXP-4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005.zip |
moebius#231: Consider blocking top level window data: URIs (tests)
https://github.com/MoonchildProductions/moebius/pull/231
Diffstat (limited to 'editor/libeditor/tests/test_bug966552.html')
-rw-r--r-- | editor/libeditor/tests/test_bug966552.html | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/editor/libeditor/tests/test_bug966552.html b/editor/libeditor/tests/test_bug966552.html index 3d0ec5fe3..e18883aad 100644 --- a/editor/libeditor/tests/test_bug966552.html +++ b/editor/libeditor/tests/test_bug966552.html @@ -18,13 +18,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=966552 <script class="testbody" type="text/javascript"> SimpleTest.waitForExplicitFinish(); -addLoadEvent(function() { - var win = window.open("data:text/html,<body onload=\"document.designMode='on'\">test</body>", "", "test-966552"); - win.addEventListener("load", function onLoad() { - win.removeEventListener("load", onLoad); - runTest(win); - }, false); -}); +var win = window.open("file_bug966552.html", "", "test-966552"); +win.addEventListener("load", function() { + runTest(win); +}, {once: true}); function runTest(win) { SimpleTest.waitForFocus(function() { @@ -33,7 +30,7 @@ function runTest(win) { doc.body.focus(); sel.collapse(doc.body.firstChild, 2); synthesizeKey("VK_BACK_SPACE", {ctrlKey: true}, win); - is(doc.body.textContent, "st"); + is(doc.body.textContent.trim(), "st"); win.close(); SimpleTest.finish(); }, win); |