Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <?xml version="1.0"?>
3 <!-- This Source Code Form is subject to the terms of the Mozilla Public
4 - License, v. 2.0. If a copy of the MPL was not distributed with this
5 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
8 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
9 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
11 <window title="Textbox with placeholder undo test" width="500" height="600"
12 onload="doTest();"
13 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
14 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
15 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
17 <hbox>
18 <textbox id="t1" placeholder="empty"/>
19 </hbox>
21 <!-- test results are displayed in the html:body -->
22 <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;">
23 <p id="display">
24 </p>
25 <div id="content" style="display: none">
26 </div>
27 <pre id="test">
28 </pre>
29 </body>
31 <!-- test code goes here -->
32 <script type="application/javascript"><![CDATA[
33 SimpleTest.waitForExplicitFinish();
35 function doTest() {
36 var t1 = $("t1");
37 t1.focus();
38 var t1Enabled = {};
39 var t1CanUndo = {};
40 t1.editor.canUndo(t1Enabled, t1CanUndo);
41 ok(!t1CanUndo.value, "undo correctly disabled when no user edits");
42 SimpleTest.finish();
43 }
45 ]]></script>
47 </window>