layout/base/tests/test_bug667512.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/test_bug667512.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=667512
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 667512</title>
    1.11 +  <script type="application/javascript" src="/MochiKit/packed.js"></script>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.14 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.15 +</head>
    1.16 +<body>
    1.17 +<table contenteditable="true"><tbody><tr><td id="b"><br id="a"></td></tr></tbody></table>
    1.18 +<span style="display: list-item;direction: rtl;"></span>
    1.19 +<script type="application/javascript">
    1.20 +
    1.21 +/** Test for Bug 667512 **/
    1.22 +function appendElements() {
    1.23 +  window.focus();
    1.24 +  window.getSelection().collapse(document.documentElement, 0);
    1.25 +
    1.26 +  var x=document.getElementById('a');
    1.27 +  x.parentNode.removeChild(x);
    1.28 +
    1.29 +  var x=document.getElementById('b');
    1.30 +  x.parentNode.removeChild(x);
    1.31 +
    1.32 +  synthesizeKey("VK_LEFT", {});
    1.33 +  synthesizeKey("VK_RIGHT", {});
    1.34 +
    1.35 +  ok(true, "Should not crash!");
    1.36 +  SimpleTest.finish();
    1.37 +}
    1.38 +
    1.39 +addLoadEvent(appendElements);
    1.40 +SimpleTest.waitForExplicitFinish();
    1.41 +
    1.42 +</script>
    1.43 +</body>
    1.44 +</html>
    1.45 \ No newline at end of file

mercurial