editor/libeditor/text/tests/test_bug590554.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:f7312fd45925
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=590554
5 -->
6
7 <head>
8 <title>Test for Bug 590554</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
12 </head>
13
14 <body>
15
16 <script type="application/javascript">
17
18 /** Test for Bug 590554 **/
19
20 SimpleTest.waitForExplicitFinish();
21
22 SimpleTest.waitForFocus(function() {
23 var t = document.querySelector("textarea");
24 t.focus();
25 synthesizeKey("VK_RETURN", {});
26 is(t.value, "\n", "Pressing enter should work the first time");
27 synthesizeKey("VK_RETURN", {});
28 is(t.value, "\n", "Pressing enter should not work the second time");
29 SimpleTest.finish();
30 });
31
32 </script>
33
34 <textarea maxlength="1"></textarea>
35 </body>
36 </html>

mercurial