editor/libeditor/html/tests/test_bug686203.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 <!-- 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 file,
     4    - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
     5 <html>
     6 <!--
     7 https://bugzilla.mozilla.org/show_bug.cgi?id=686203
     8 -->
    10 <head>
    11   <title>Test for Bug 686203</title>
    12   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    13   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    14   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
    15 </head>
    17 <body>
    18   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686203">Mozilla Bug 686203</a>
    19   <p id="display"></p>
    20   <div id="content" style="display: none">
    21   </div>
    23   <pre id="test">
    24     <script type="application/javascript">
    26       /** Test for Bug 686203 **/
    27       SimpleTest.waitForExplicitFinish();
    28       SimpleTest.waitForFocus(function() {
    29         var ce = document.getElementById("ce");
    30         var input = document.getElementById("input");
    31         ce.focus();
    33         var eventDetails = { button : 2 };
    34         synthesizeMouseAtCenter(input, eventDetails);
    36         synthesizeKey("Z", {});
    38         /* check values */
    39         is(input.value, "Z", "input correctly focused after right-click");
    40         is(ce.textContent, "abc", "contenteditable correctly blurred after right-click on input"); 
    42         SimpleTest.finish();
    43       });
    44    </script>
    45   </pre>
    47   <input type="text" value="" id="input" />
    48   <div id="ce" contenteditable="true">abc</div>
    49 </body>
    50 </html>

mercurial