4 https://bugzilla.mozilla.org/show_bug.cgi?id=966155
7 <title>Test for Bug
966155</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=966155">Mozilla Bug
966155</a>
15 <div id=
"content" style=
"display: none">
18 <script class=
"testbody" type=
"text/javascript">
19 SimpleTest.waitForExplicitFinish();
21 var testWindow = window.open(
"file_bug966155.html",
"",
"test-966155");
22 testWindow.addEventListener(
"load", function() {
26 function runTest(win) {
27 SimpleTest.waitForFocus(function() {
28 var doc = win.document;
29 var iframe = doc.querySelector(
"iframe");
30 var iframeDoc = iframe.contentDocument;
31 var input = doc.querySelector(
"input");
33 iframeDoc.body.focus();
35 "test".split(
"").forEach(function(letter) {
36 synthesizeKey(letter, {}, win);
38 is(iframeDoc.body.textContent.trim(),
"test",
"entered the text");
39 // focus the input box
42 synthesizeKey(
"VK_TAB", {}, win);
43 // Now press Ctrl+Backspace
44 synthesizeKey(
"VK_BACK_SPACE", {ctrlKey: true}, win);
45 is(iframeDoc.body.textContent.trim(),
"",
"deleted the text");