4 https://bugzilla.mozilla.org/show_bug.cgi?id=612128
7 <title>Test for Bug
612128</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=612128">Mozilla Bug
612128</a>
17 <div contenteditable
></div>
20 <script type=
"application/javascript">
22 /* eslint-disable no-useless-concat */
24 /** Test for Bug
612128 **/
25 SimpleTest.waitForExplicitFinish();
26 addLoadEvent(function() {
27 document.querySelector(
"input").focus();
29 is(document.execCommand(
"inserthtml", null,
"<span>f" +
"oo</span>"),
30 false,
"The insertHTML command should return false");
32 ok(false,
"insertHTML should not throw here");
34 is(document.querySelectorAll(
"span").length,
0,
"No span element should be injected inside the page");
35 is(document.body.innerHTML.indexOf(
"f" +
"oo"), -
1,
"No text should be injected inside the page");