1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/tests/chrome/test_bug471776.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +<?xml version="1.0"?> 1.5 + 1.6 +<!-- This Source Code Form is subject to the terms of the Mozilla Public 1.7 + - License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> 1.9 + 1.10 + 1.11 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.12 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> 1.13 + 1.14 +<window title="Textbox with placeholder undo test" width="500" height="600" 1.15 + onload="doTest();" 1.16 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.17 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.18 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> 1.19 + 1.20 + <hbox> 1.21 + <textbox id="t1" placeholder="empty"/> 1.22 + </hbox> 1.23 + 1.24 + <!-- test results are displayed in the html:body --> 1.25 + <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"> 1.26 + <p id="display"> 1.27 + </p> 1.28 + <div id="content" style="display: none"> 1.29 + </div> 1.30 + <pre id="test"> 1.31 + </pre> 1.32 + </body> 1.33 + 1.34 + <!-- test code goes here --> 1.35 + <script type="application/javascript"><![CDATA[ 1.36 + SimpleTest.waitForExplicitFinish(); 1.37 + 1.38 + function doTest() { 1.39 + var t1 = $("t1"); 1.40 + t1.focus(); 1.41 + var t1Enabled = {}; 1.42 + var t1CanUndo = {}; 1.43 + t1.editor.canUndo(t1Enabled, t1CanUndo); 1.44 + ok(!t1CanUndo.value, "undo correctly disabled when no user edits"); 1.45 + SimpleTest.finish(); 1.46 + } 1.47 + 1.48 + ]]></script> 1.49 + 1.50 +</window>