1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/test/test_bug488417.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=488417 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 488417</title> 1.11 + <script type="application/javascript" src="/MochiKit/MochiKit.js"></script> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <script type="application/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 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488417">Mozilla Bug 488417</a> 1.18 +<div id="display"> 1.19 + <table border="1"> 1.20 + <tr> 1.21 + <td id="a">A1</td> 1.22 + <td id="b">B1</td> 1.23 + </tr> 1.24 + <tr> 1.25 + <td>A2</td> 1.26 + <td>B2</td> 1.27 + </tr> 1.28 + </table> 1.29 +</div> 1.30 +<div id="content" style="display: none"> 1.31 + 1.32 +</div> 1.33 +<pre id="test"> 1.34 +<script type="application/javascript"> 1.35 + 1.36 +function clickIt(node) { 1.37 + synthesizeMouse(node, node.getBoundingClientRect().width/2, 1.38 + node.getBoundingClientRect().height/2, 1.39 + { accelKey: 1 }); 1.40 +} 1.41 + 1.42 +/** Test for Bug 488417 **/ 1.43 +SimpleTest.waitForExplicitFinish(); 1.44 + 1.45 +addLoadEvent(function() { 1.46 + // Do the test async so we can unsuppress painting 1.47 + SimpleTest.executeSoon(function() { 1.48 + clickIt($("a")); 1.49 + clickIt($("b")); 1.50 + clickIt($("a")); 1.51 + ok(1, "Got here"); 1.52 + // Clean up 1.53 + window.getSelection().removeAllRanges(); 1.54 + SimpleTest.finish(); 1.55 + }); 1.56 +}); 1.57 + 1.58 + 1.59 +</script> 1.60 +</pre> 1.61 +</body> 1.62 +</html>