tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_can_undo_after_setting_value.xhtml (1101B)


      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"/>
     13 
     14  <input xmlns="http://www.w3.org/1999/xhtml" id="t"/>
     15  <script class="testbody" type="application/javascript">
     16  <![CDATA[
     17 
     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"
     24  );
     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"
     31  );
     32  SimpleTest.finish();
     33 }
     34 
     35 SimpleTest.waitForExplicitFinish();
     36 ]]>
     37 </script>
     38 </window>