4 https://bugzilla.mozilla.org/show_bug.cgi?id=446663
7 <title>Test for Bug
446663</title>
8 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=446663">Mozilla Bug
446663</a>
15 <style>#bug446663_a:focus{overflow:hidden}
</style>
16 <input id=
"bug446663_a"><input id=
"bug446663_b"></p>
17 <div id=
"content" style=
"display: none">
21 <script class=
"testbody" type=
"text/javascript">
23 /** Test for Bug
446663 **/
25 function test_edit_cmds(id) {
26 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
28 var elm = document.getElementById(id);
31 elm.controllers.getControllerForCommand('cmd_cut')
32 .doCommand('cmd_cut');
33 is(elm.value, '', id +
" cut");
35 elm.controllers.getControllerForCommand('cmd_undo')
36 .doCommand('cmd_undo');
37 is(elm.value, '
123', id +
" undo");
40 var inputHappened = false;
41 function inputListener() {
43 $(id).removeEventListener(
"input", inputListener, false);
46 var id = 'bug446663_a'
47 var elm = document.getElementById(id);
49 var x = document.body.offsetHeight;
50 $(id).addEventListener(
"input", inputListener, false);
52 is(inputHappened, true,
"How come no input?");
57 x = document.body.offsetHeight;
58 is(elm.value, '
123', id +
" edit");
62 elm = document.getElementById(id);
65 elm.style.display = 'none'
66 var x = document.body.offsetHeight;
67 elm.style.display = 'inline'
68 x = document.body.offsetHeight;
73 x = document.body.offsetHeight;
74 is(elm.value, '
123', id +
" edit");