layout/base/tests/bug682712-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/bug682712-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +<html class="reftest-wait">
     1.5 +  <head>
     1.6 +    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     1.7 +    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     1.8 +  </head>
     1.9 +  <body onload="start()">
    1.10 +    <iframe src="data:text/html,<body contenteditable spellcheck=false>foo bar"></iframe>
    1.11 +    <script>
    1.12 +      function start() {
    1.13 +        var iframe = document.querySelector("iframe");
    1.14 +        var win = iframe.contentWindow;
    1.15 +        var doc = iframe.contentDocument;
    1.16 +
    1.17 +        // Reframe the iframe
    1.18 +        iframe.style.display = "none";
    1.19 +        document.body.clientWidth;
    1.20 +        iframe.style.display = "";
    1.21 +        document.body.clientWidth;
    1.22 +
    1.23 +        setTimeout(function() {
    1.24 +          doc.body.focus();
    1.25 +
    1.26 +          // Now try to move the caret
    1.27 +          win.getSelection().collapse(doc.body.firstChild, 0);
    1.28 +          synthesizeKey("VK_RIGHT", {});
    1.29 +
    1.30 +          document.documentElement.removeAttribute("class");
    1.31 +        }, 0);
    1.32 +      }
    1.33 +    </script>
    1.34 +  </body>
    1.35 +</html>

mercurial