Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: LayoutTests/fast/events/shadow-boundary-crossing-2.html

Issue 5605003: Merge 73270 - 2010-12-03 Dimitri Glazkov <dglazkov@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/fast/events/shadow-boundary-crossing-2-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/shadow-boundary-crossing-2.html
===================================================================
--- LayoutTests/fast/events/shadow-boundary-crossing-2.html (revision 73270)
+++ LayoutTests/fast/events/shadow-boundary-crossing-2.html (working copy)
@@ -21,7 +21,18 @@
eventSender.mouseUp();
}
+function clickOnLeftQuarterOf(element)
+{
+ if (!window.eventSender)
+ return;
+ var x = element.offsetLeft + element.offsetWidth / 4;
+ var y = element.offsetTop + element.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
function leapForward()
{
if (!window.eventSender)
@@ -45,7 +56,7 @@
log('Mutation events should not propagate out of the shadow DOM', !mutationEventFired);
textarea.parentNode.removeChild(textarea);
},
- defaultEventRetargeting: function()
+ labelSyntheticClick: function()
{
var count = 0;
var label = document.body.appendChild(document.createElement('label'));
@@ -58,9 +69,24 @@
count++;
}, false);
clickOn(searchInput);
- log("Events for default event handler should also be retargeted", count == 1);
+ log("Label should look beyond shadow boundary to detect if it encloses its associated element", count == 1);
label.parentNode.removeChild(label);
},
+ defaultEventRetargeting: function()
+ {
+ var count = 0;
+ var fileInput = document.body.appendChild(document.createElement('input'));
+ fileInput.setAttribute('type', 'file');
+ var counter = function()
+ {
+ count++;
+ }
+ document.body.addEventListener('DOMActivate', counter, false);
+ clickOnLeftQuarterOf(fileInput);
+ log("Events for default event handler should not be retargeted", count == 1);
+ document.body.removeEventListener('DOMActivate', counter, false);
+ fileInput.parentNode.removeChild(fileInput);
+ },
eventInProgress: function()
{
var textInput = document.body.appendChild(document.createElement('input'));
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/fast/events/shadow-boundary-crossing-2-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698