|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=550434 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 550434</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
10 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=550434">Mozilla Bug 550434</a> |
|
14 <p id="display"></p> |
|
15 <div id="content"> |
|
16 <div id="editor" contenteditable="true" |
|
17 style="height: 250px; height: 200px; border: 4px solid red; outline: none;"></div> |
|
18 </div> |
|
19 <pre id="test"> |
|
20 <script type="application/javascript"> |
|
21 |
|
22 /** Test for Bug 550434 **/ |
|
23 |
|
24 SimpleTest.waitForExplicitFinish(); |
|
25 SimpleTest.waitForFocus(function() { |
|
26 var ed = document.getElementById("editor"); |
|
27 |
|
28 // Simulate click twice |
|
29 synthesizeMouse(ed, 10, 10, {}); |
|
30 synthesizeMouse(ed, 50, 50, {}); |
|
31 setTimeout(function() { |
|
32 synthesizeKey("x", {}); |
|
33 |
|
34 is(ed.innerHTML, "x", "Editor should work after being clicked twice"); |
|
35 SimpleTest.finish(); |
|
36 }, 0); |
|
37 }); |
|
38 |
|
39 </script> |
|
40 </pre> |
|
41 </body> |
|
42 </html> |