4 https://bugzilla.mozilla.org/show_bug.cgi?id=612447
7 <title>Test for Bug
612447</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <script src=
"/tests/SimpleTest/WindowSnapshot.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=612447">Mozilla Bug
612447</a>
20 <script type=
"application/javascript">
22 /** Test for Bug
612447 **/
23 SimpleTest.waitForExplicitFinish();
24 SimpleTest.waitForFocus(function() {
25 function editorCommandsEnabled() {
28 doc.execCommand(
"justifyfull", false, null);
35 var i = document.querySelector(
"iframe");
36 var doc = i.contentDocument;
37 var win = i.contentWindow;
39 doc.designMode =
"on";
42 var beforeA = snapshotWindow(win, true);
44 var beforeB = snapshotWindow(win, true);
45 is(b.textContent,
"X",
"Typing should work");
46 while (b.firstChild) {
47 b.firstChild.remove();
49 ok(editorCommandsEnabled(),
"The editor commands should work");
51 i.style.display =
"block";
56 var afterA = snapshotWindow(win, true);
58 var afterB = snapshotWindow(win, true);
59 is(b.textContent,
"X",
"Typing should work");
60 while (b.firstChild) {
61 b.firstChild.remove();
63 ok(editorCommandsEnabled(),
"The editor commands should work");
65 ok(compareSnapshots(beforeA, afterA, true)[
0],
"The iframes should look the same before typing");
66 ok(compareSnapshots(beforeB, afterB, true)[
0],
"The iframes should look the same after typing");