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

Unified Diff: LayoutTests/fast/events/resources/record-events.js

Issue 1170513002: Update the mouse events on tapping of gesture across frames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months 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 | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-mouse-events-between-frames.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/resources/record-events.js
diff --git a/LayoutTests/fast/events/resources/record-events.js b/LayoutTests/fast/events/resources/record-events.js
index c32a0ec04ef96ea52d591bdd8fdc70a4c4ec1a75..7ab52fc78e01fb73cb3c9a838d01470093ac39ca 100644
--- a/LayoutTests/fast/events/resources/record-events.js
+++ b/LayoutTests/fast/events/resources/record-events.js
@@ -41,37 +41,25 @@ function _processEachRegisteredElement(callback)
function _recordEvent(event)
{
- replayEventQueue.push(event);
+ replayEventQueue.push([event, event.currentTarget.id]);
}
function checkThatEventsFiredInOrder(expectedOrderQueue)
{
- function eventTarget(event)
- {
- // In Internet Explorer an Event object does not have a "target" property.
- // The analagous property is called "srcElement".
- return event.target || event.srcElement;
- }
-
- function elementIdOrTagName(element)
- {
- return element.id || element.tagName;
- }
-
while (replayEventQueue.length && expectedOrderQueue.length) {
var replayedEvent = replayEventQueue.shift();
var expectedEvent = expectedOrderQueue.shift();
- var replayedEventTargetName = elementIdOrTagName(eventTarget(replayedEvent));
- if (replayedEventTargetName === expectedEvent[0] && replayedEvent.type === expectedEvent[1])
- testPassed('fired event is (' + replayedEventTargetName + ', ' + replayedEvent.type + ').');
+ var replayedEventTargetName = replayedEvent[1];
+ if (replayedEventTargetName === expectedEvent[0] && replayedEvent[0].type === expectedEvent[1])
+ testPassed('fired event is (' + replayedEventTargetName + ', ' + replayedEvent[0].type + ').');
else {
- testFailed('fired event is (' + replayedEventTargetName + ', ' + replayedEvent.type + '). ' +
+ testFailed('fired event is (' + replayedEventTargetName + ', ' + replayedEvent[0].type + '). ' +
'Should be (' + expectedEvent[0] + ', ' + expectedEvent[1] + ').');
}
}
while (replayEventQueue.length) {
var replayedEvent = replayEventQueue.shift();
- testFailed('should not have fired event (' + elementIdOrTagName(eventTarget(replayedEvent)) + ', ' + replayedEvent.type + '). But did.');
+ testFailed('should not have fired event (' + replayedEvent[1] + ', ' + replayedEvent[0].type + '). But did.');
}
while (expectedOrderQueue.length) {
var expectedEvent = expectedOrderQueue.shift();
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-mouse-events-between-frames.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698