Index: LayoutTests/fast/events/shadow-boundary-crossing.html |
=================================================================== |
--- LayoutTests/fast/events/shadow-boundary-crossing.html (revision 78113) |
+++ LayoutTests/fast/events/shadow-boundary-crossing.html (working copy) |
@@ -9,7 +9,7 @@ |
logDiv.appendChild(document.createElement('div')).textContent = msg + ': ' + (success ? 'PASS' : 'FAIL'); |
} |
-function clickOn(element) |
+function moveOver(element) |
{ |
if (!window.eventSender) |
return; |
@@ -17,6 +17,11 @@ |
var x = element.offsetLeft + element.offsetWidth / 2; |
var y = element.offsetTop + element.offsetHeight / 2; |
eventSender.mouseMoveTo(x, y); |
+} |
+ |
+function clickOn(element) |
+{ |
+ moveOver(element); |
eventSender.mouseDown(); |
eventSender.mouseUp(); |
} |
@@ -100,6 +105,22 @@ |
document.body.removeEventListener('DOMActivate', counter, false); |
fileInput.parentNode.removeChild(fileInput); |
}, |
+ relatedTargetRetargeting: function() |
+ { |
+ var count = 0; |
+ var textInput = document.body.appendChild(document.createElement('input')); |
+ var counter = function(evt) |
+ { |
+ if (evt.relatedTarget && !evt.relatedTarget.parentNode) |
+ count++; |
+ } |
+ moveOver(textInput); |
+ document.body.addEventListener("mouseover", counter, false); |
+ moveOver(document.body); |
+ document.body.removeEventListener("mouseover", counter, false); |
+ log("Event's relatedTarget should be retargeted", count == 0); |
+ textInput.parentNode.removeChild(textInput); |
+ }, |
eventInProgress: function() |
{ |
var textInput = document.body.appendChild(document.createElement('input')); |