layout/base/tests/bug512295-2.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML><html class="reftest-wait"><head>
     2   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     3 </head>
     4 <body>
     5 x
     6 <div contenteditable="true">
     7 <p id="p">A B CD EFG<br>
     8   1234567890</p>
     9 </div>
    10 <script>
    11   // Position the caret after "A"
    12   var sel = window.getSelection();
    13   sel.removeAllRanges();
    14   var range = document.createRange();
    15   var p = document.getElementById('p');
    16   var t = p.firstChild;
    17   range.setStart(t, 1);
    18   range.setEnd(t, 1);
    19   sel.addRange(range);
    20   p.parentNode.focus();
    22   SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
    23   onSpellCheck(p.parentNode, function () {
    24     sendKey('DOWN');  // now after "1"
    25     sendKey('DOWN');  // now below the P element
    26     sendKey('UP');    // now before the "1"
    27     sendKey('UP');    // now before the "A"
    28     sendKey('UP');    // now before the "A"
    29     sendKey('UP');    // now before the "A"
    30     document.documentElement.classList.remove("reftest-wait");
    31   });
    32 </script>
    33 </body>
    34 </html>

mercurial