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