toolkit/content/tests/chrome/test_bug471776.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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>

mercurial