| OLD | NEW |
| (Empty) | |
| 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 |
| 4 <style> |
| 5 #target { |
| 6 width: 200px; |
| 7 height: 200px; |
| 8 } |
| 9 </style> |
| 10 |
| 11 <p>This is the top level window.</p> |
| 12 <p>Click somewhere. Move the mouse into the iframe.</p> |
| 13 <p>Mouse move should be received by the iframe.</p> |
| 14 <iframe id="target" srcdoc=" |
| 15 <p>This is the iframe.</p> |
| 16 <script> |
| 17 document.addEventListener('mousemove', function() { |
| 18 parent.mouseMoveReceived(); |
| 19 }); |
| 20 </script> |
| 21 "></iframe> |
| 22 |
| 23 <script> |
| 24 var test_mousemove = async_test("Inner frame should receive mousemove even when
mouseup preventDefault was called in the parent frame."); |
| 25 var mouseUpPrevented = 0; |
| 26 function mouseMoveReceived() { |
| 27 if (mouseUpPrevented == 1) |
| 28 test_mousemove.done(); |
| 29 } |
| 30 document.addEventListener("mouseup", function(e) { |
| 31 e.preventDefault(); |
| 32 mouseUpPrevented = 1; |
| 33 }); |
| 34 |
| 35 function runTest() { |
| 36 if (window.eventSender) { |
| 37 var targetRect = document.getElementById("target").getBoundingClientRect(); |
| 38 eventSender.mouseMoveTo(targetRect.right+10, targetRect.bottom+10); |
| 39 eventSender.mouseDown(0); |
| 40 eventSender.mouseUp(0); |
| 41 eventSender.mouseMoveTo(targetRect.right-10, targetRect.bottom-10); |
| 42 } |
| 43 } |
| 44 window.onload = function() { |
| 45 runTest(); |
| 46 } |
| 47 </script> |
| OLD | NEW |