test_bug372345.html (1625B)
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 src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script 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 srcdoc="<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 function testCursor(post) { 28 setTimeout(function() { 29 var link = document.createElement("a"); 30 link.href = "http://mozilla.org/"; 31 link.textContent = "link"; 32 link.style.cursor = "pointer"; 33 content.appendChild(link); 34 is(iframe.contentWindow.getComputedStyle(link).cursor, "pointer", "Make sure that the cursor is set to pointer"); 35 setTimeout(post, 0); 36 }, 0); 37 } 38 testCursor(function() { 39 doc.designMode = "on"; 40 testCursor(function() { 41 doc.designMode = "off"; 42 testCursor(function() { 43 content.setAttribute("contenteditable", "true"); 44 testCursor(function() { 45 content.removeAttribute("contenteditable"); 46 testCursor(function() { 47 SimpleTest.finish(); 48 }); 49 }); 50 }); 51 }); 52 }); 53 }); 54 55 </script> 56 </pre> 57 </body> 58 </html>