diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
commit | 941e54654eabed0a3568f7fefe424a45aa02eddb (patch) | |
tree | 49aa02b174c428962d99142d8061267bfcd79e69 /editor/libeditor/tests/test_bug966155.html | |
parent | ad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff) | |
parent | 0daa12376295d5d796256a116eb2a348a3a9273f (diff) | |
download | UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'editor/libeditor/tests/test_bug966155.html')
-rw-r--r-- | editor/libeditor/tests/test_bug966155.html | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/editor/libeditor/tests/test_bug966155.html b/editor/libeditor/tests/test_bug966155.html index 524b15d69..1e7ed67f3 100644 --- a/editor/libeditor/tests/test_bug966155.html +++ b/editor/libeditor/tests/test_bug966155.html @@ -18,13 +18,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=966155 <script class="testbody" type="text/javascript"> SimpleTest.waitForExplicitFinish(); -addLoadEvent(function() { - var win = window.open("data:text/html,<input><iframe onload=\"contentDocument.designMode = 'on';\">", "", "test-966155"); - win.addEventListener("load", function onLoad() { - win.removeEventListener("load", onLoad); - runTest(win); - }, false); -}); +var win = window.open("file_bug966155.html", "", "test-966155"); +win.addEventListener("load", function() { + runTest(win); +}, {once: true}); function runTest(win) { SimpleTest.waitForFocus(function() { @@ -38,14 +35,14 @@ function runTest(win) { "test".split("").forEach(function(letter) { synthesizeKey(letter, {}, win); }); - is(iframeDoc.body.textContent, "test", "entered the text"); + is(iframeDoc.body.textContent.trim(), "test", "entered the text"); // focus the input box input.focus(); // press tab synthesizeKey("VK_TAB", {}, win); // Now press Ctrl+Backspace synthesizeKey("VK_BACK_SPACE", {ctrlKey: true}, win); - is(iframeDoc.body.textContent, "", "deleted the text"); + is(iframeDoc.body.textContent.trim(), "", "deleted the text"); win.close(); SimpleTest.finish(); }, win); |