toolkit/content/tests/chrome/test_bug471776.xul

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:87c8adbaa986
1 <?xml version="1.0"?>
2
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/. -->
6
7
8 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
9 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
10
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>
16
17 <hbox>
18 <textbox id="t1" placeholder="empty"/>
19 </hbox>
20
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>
30
31 <!-- test code goes here -->
32 <script type="application/javascript"><![CDATA[
33 SimpleTest.waitForExplicitFinish();
34
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 }
44
45 ]]></script>
46
47 </window>

mercurial