editor/libeditor/html/tests/test_bug550434.html

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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">
    22 /** Test for Bug 550434 **/
    24 SimpleTest.waitForExplicitFinish();
    25 SimpleTest.waitForFocus(function() {
    26   var ed = document.getElementById("editor");
    28   // Simulate click twice
    29   synthesizeMouse(ed, 10, 10, {});
    30   synthesizeMouse(ed, 50, 50, {});
    31   setTimeout(function() {
    32   synthesizeKey("x", {});
    34   is(ed.innerHTML, "x", "Editor should work after being clicked twice");
    35   SimpleTest.finish();
    36   }, 0);
    37 });
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial