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.
1 <!DOCTYPE HTML>
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/. -->
5 <html>
6 <!--
7 https://bugzilla.mozilla.org/show_bug.cgi?id=483651
8 -->
10 <head>
11 <title>Test for Bug 483651</title>
12 <script type="application/javascript"
13 src="chrome://mochikit/content/MochiKit/packed.js"></script>
14 <script type="application/javascript"
15 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
16 <script type="application/javascript"
17 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
18 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
19 </head>
21 <body onload="doTest();">
22 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=483651">Mozilla Bug 483651</a>
23 <p id="display"></p>
24 <div id="content" style="display: none">
25 </div>
27 <pre id="test">
28 <script type="application/javascript">
30 /** Test for Bug 483651 **/
32 SimpleTest.waitForExplicitFinish();
34 function doTest() {
35 var t1 = $("t1");
36 var editor = null;
38 if (t1 instanceof Components.interfaces.nsIDOMNSEditableElement)
39 editor = t1.editor;
41 ok(editor, "able to get editor for the element");
42 t1.focus();
43 synthesizeKey("A", {});
44 synthesizeKey("VK_BACK_SPACE", {});
46 try {
47 // Was the trailing br removed?
48 is(editor.documentIsEmpty, true, "trailing <br> correctly removed");
49 } catch (e) {
50 ok(false, "test failed with error "+e);
51 }
52 SimpleTest.finish();
53 }
54 </script>
55 </pre>
57 <textarea id="t1" rows="2" columns="80"></textarea>
58 </body>
59 </html>