editor/libeditor/text/tests/test_bug740784.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/libeditor/text/tests/test_bug740784.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +   - License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 +   - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
     1.8 +<html>
     1.9 +<!--
    1.10 +https://bugzilla.mozilla.org/show_bug.cgi?id=740784
    1.11 +-->
    1.12 +
    1.13 +<head>
    1.14 +  <title>Test for Bug 740784</title>
    1.15 +  <script type="application/javascript" src="/MochiKit/packed.js"></script>
    1.16 +  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.17 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.18 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
    1.19 +</head>
    1.20 +
    1.21 +<body>
    1.22 +  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=740784">Mozilla Bug 740784</a>
    1.23 +  <p id="display"></p>
    1.24 +  <div id="content" style="display: none">
    1.25 +  </div>
    1.26 +
    1.27 +  <pre id="test">
    1.28 +    <script type="application/javascript">
    1.29 +
    1.30 +      /** Test for Bug 740784 **/
    1.31 +
    1.32 +      SimpleTest.waitForExplicitFinish();
    1.33 +      SimpleTest.waitForFocus(function() {
    1.34 +        var t1 = $("t1");
    1.35 +
    1.36 +        t1.focus();
    1.37 +        synthesizeKey("VK_END", {});
    1.38 +        synthesizeKey("VK_BACK_SPACE", {});
    1.39 +        synthesizeKey("Z", {accelKey: true});
    1.40 +
    1.41 +        // Was the former bogus node changed to a mozBR?
    1.42 +        is(t1.value, "a", "trailing <br> correctly ignored");
    1.43 +
    1.44 +        SimpleTest.finish();
    1.45 +      });
    1.46 +   </script>
    1.47 +  </pre>
    1.48 +
    1.49 +  <textarea id="t1" rows="2" columns="80">a</textarea>
    1.50 +</body>
    1.51 +</html>

mercurial