Bug 1455330 - Remove unsafeSetInnerHTML from test_bug570192.xul. r?johannh
MozReview-Commit-ID: FuS9PfR3tqv
--- a/toolkit/content/tests/chrome/test_bug570192.xul
+++ b/toolkit/content/tests/chrome/test_bug570192.xul
@@ -27,25 +27,26 @@ https://bugzilla.mozilla.org/show_bug.cg
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
<script type="application/javascript">
<![CDATA[
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
addLoadEvent(function() {
try {
var content = document.getElementById("content");
- content.unsafeSetInnerHTML('<textbox newlines="pasteintact" ' +
- 'xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>');
- var textbox = content.firstChild;
- ok(textbox, "created the textbox");
- ok(!textbox.editor, "do we have an editor?");
+ let textbox = document.createElementNS(XUL_NS, "textbox");
+ textbox.setAttribute("newlines", "pasteintact");
+ content.appendChild(textbox);
+ ok(content.firstChild, "created the textbox");
+ ok(!content.firstChild.editor, "do we have an editor?");
} catch (e) {
ok(false, "Got an exception: " + e);
}
SimpleTest.finish();
});
SimpleTest.waitForExplicitFinish();
]]>