Bug 1874684 - Part 17: Fix uninitialised variable warnings from clang-tidy. r=allstarschh
[gecko.git] / editor / libeditor / tests / test_can_undo_after_setting_value.xhtml
blob03204f8500e02cc0a4b1fa05cff17891f7f23b06
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin"
3 type="text/css"?>
4 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
5 type="text/css"?>
6 <!--
7 https://bugzilla.mozilla.org/show_bug.cgi?id=1386222
8 -->
9 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
10 title="Mozilla Bug 1386222" onload="runTest();">
11 <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
12 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
14 <input xmlns="http://www.w3.org/1999/xhtml" id="t"/>
15 <script class="testbody" type="application/javascript">
16 <![CDATA[
18 function runTest() {
19 var t = document.getElementById("t");
20 is(
21 t.editor.canUndo,
22 false,
23 "Editor shouldn't have undo transaction at start"
25 t.value = "foo";
26 is(t.value, "foo", "value setter worked");
27 is(
28 t.editor.canUndo,
29 true,
30 "Editor should have undo transaction after setting value"
32 SimpleTest.finish();
35 SimpleTest.waitForExplicitFinish();
36 ]]>
37 </script>
38 </window>