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/. -->
7 https://bugzilla.mozilla.org/show_bug.cgi?id=46555
11 <title>Test for Bug
46555</title>
12 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
13 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
17 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=46555">Mozilla Bug
46555</a>
19 <div id=
"content" style=
"display: none">
22 <input type=
"text" value=
"" id=
"t1" />
25 <script type=
"application/javascript">
27 /** Test for Bug
46555 **/
28 SimpleTest.waitForExplicitFinish();
29 SimpleTest.waitForFocus(function() {
30 const kCmd =
"cmd_selectAll";
32 var input = document.getElementById(
"t1");
35 SpecialPowers.wrap(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");