layout/base/tests/bug512295-2-ref.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/bug512295-2-ref.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +<!DOCTYPE HTML><html class="reftest-wait"><head>
     1.5 +  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     1.6 +</head>
     1.7 +<body>
     1.8 +x
     1.9 +<div contenteditable="true">
    1.10 +<p id="p">A B CD EFG<br>
    1.11 +  1234567890</p>
    1.12 +</div>
    1.13 +<script>
    1.14 +  // Position the caret before the "A"
    1.15 +  var p = document.getElementById('p');
    1.16 +  var div = p.parentNode;
    1.17 +  div.focus();
    1.18 +  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
    1.19 +  onSpellCheck(div, function () {
    1.20 +    var sel = window.getSelection();
    1.21 +    sel.removeAllRanges();
    1.22 +    var range = document.createRange();
    1.23 +    range.setStart(p.firstChild, 0);
    1.24 +    range.setEnd(p.firstChild, 0);
    1.25 +    sel.addRange(range);
    1.26 +    document.documentElement.classList.remove("reftest-wait");
    1.27 +  });
    1.28 +</script>
    1.29 +
    1.30 +</body>
    1.31 +</html>

mercurial