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 <!DOCTYPE HTML>
2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3 - License, v. 2.0. If a copy of the MPL was not distributed with this
4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <html>
6 <!--
7 https://bugzilla.mozilla.org/show_bug.cgi?id=46555
8 -->
10 <head>
11 <title>Test for Bug 46555</title>
12 <script type="application/javascript"
13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
14 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
15 </head>
17 <body>
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=46555">Mozilla Bug 46555</a>
19 <p id="display"></p>
20 <div id="content" style="display: none">
21 </div>
23 <input type="text" value="" id="t1" />
25 <pre id="test">
26 <script type="application/javascript">
28 /** Test for Bug 46555 **/
29 SimpleTest.waitForExplicitFinish();
30 SimpleTest.waitForFocus(function() {
31 const kCmd = "cmd_selectAll";
33 var input = document.getElementById("t1");
34 input.focus();
35 var controller = input.controllers.getControllerForCommand(kCmd);
37 // Test 1: Select All should be disabled if editor is empty
38 is(controller.isCommandEnabled(kCmd), false,
39 "Select All command disabled when editor is empty");
41 SimpleTest.finish();
42 });
43 </script>
44 </pre>
46 </body>
47 </html>