Bug 1883912: Enable Intl.ListFormat test for "unit" style. r=spidermonkey-reviewers...
[gecko.git] / editor / libeditor / tests / test_bug1361052.html
blob5e9e4df065de6f8c1f3e290f69bf28457ac1eb3f
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test for Bug 1361052</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script src="/tests/SimpleTest/EventUtils.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body>
10 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1361052">Mozilla Bug 1361052</a>
11 <p id="display"></p>
12 <div id="content" style="display: none">
13 </div>
14 <pre id="test">
15 <script class="testbody" type="application/javascript">
17 SimpleTest.waitForExplicitFinish();
19 SimpleTest.waitForFocus(() => {
20 var strike = document.createElement("strike");
21 strike.contentEditable = true;
22 document.documentElement.appendChild(strike);
24 var textarea = document.createElement("textarea");
25 document.documentElement.appendChild(textarea);
27 var h5 = document.createElement("h5");
28 strike.appendChild(h5);
30 textarea.setCustomValidity("A");
31 document.documentElement.dir = "rtl";
32 document.designMode = "on";
33 document.execCommand("styleWithCSS", false, true);
34 document.designMode = "off";
35 textarea.reportValidity();
36 document.documentElement.dir = "ltr";
38 var range = document.createRange();
39 range.selectNode(h5);
40 window.getSelection().addRange(range);
42 document.execCommand("inserthorizontalrule", false, null);
43 ok(true, "No crash");
45 SimpleTest.finish();
46 });
47 </script>
48 </pre>
49 </body>
50 </html>