editor/libeditor/html/tests/test_bug372345.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:b729ae4d9637
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=372345
5 -->
6 <head>
7 <title>Test for Bug 372345</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=372345">Mozilla Bug 372345</a>
14 <p id="display"></p>
15 <div id="content">
16 <iframe src="data:text/html,<body>"></iframe>
17 </div>
18 <pre id="test">
19 <script type="application/javascript">
20
21 /** Test for Bug 372345 **/
22 SimpleTest.waitForExplicitFinish();
23 addLoadEvent(function() {
24 var iframe = document.querySelector("iframe");
25 var doc = iframe.contentDocument;
26 var content = doc.body;
27 var link = content.querySelector("a");
28 function testCursor(post) {
29 setTimeout(function() {
30 var link = document.createElement("a");
31 link.href = "http://mozilla.org/";
32 link.textContent = "link";
33 link.style.cursor = "pointer";
34 content.appendChild(link);
35 is(iframe.contentWindow.getComputedStyle(link, null).cursor, "pointer", "Make sure that the cursor is set to pointer");
36 setTimeout(post, 0);
37 }, 0);
38 }
39 testCursor(function() {
40 doc.designMode = "on";
41 testCursor(function() {
42 doc.designMode = "off";
43 testCursor(function() {
44 content.setAttribute("contenteditable", "true");
45 testCursor(function() {
46 content.removeAttribute("contenteditable");
47 testCursor(function() {
48 SimpleTest.finish();
49 });
50 });
51 });
52 });
53 });
54 });
55
56 </script>
57 </pre>
58 </body>
59 </html>

mercurial