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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html

Issue 1985363002: Move the uievents directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html
deleted file mode 100644
index 2462e5b2a032ba58169f4d82076bae4004e5ed87..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title> Event.stopImmediatePropagation() immediate effect </title>
-<script src="../../../../../resources/testharness.js"></script>
-<script src="../../../../../resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id=log></div>
-
-<table id="table" border="1" style="display: none">
- <tbody id="table-body">
- <tr id="table-row">
- <td id="table-cell">Shady Grove</td>
- <td>Aeolian</td>
- </tr>
- <tr id="parent">
- <td id="target">Over the river, Charlie</td>
- <td>Dorian</td>
- </tr>
- </tbody>
-</table>
-
-<script>
- var EVENT = "foo";
- var TARGET = document.getElementById("target");
- var PARENT = document.getElementById("parent");
- var TBODY = document.getElementById("table-body");
- var TABLE = document.getElementById("table");
- var BODY = document.body;
- var HTML = document.documentElement;
- var CurrentTargets = [window, document, HTML, BODY, TABLE, TBODY, PARENT, TARGET];
- var ExpectResult = [window, window, document, document, HTML, HTML, BODY, BODY, TABLE];
- var ActualResult = [];
- var ExpectListeners = [0,1,0,1,0,1,0,1,0];
- var ActualListeners = [];
-
- var description = "Test Description: " +
- "stopImmediatePropagation() prevents other event listeners from being triggered and, unlike " +
- "Event.stopPropagation(), its effect must be immediate. Once it has been called, further calls " +
- "to this method have no additional effect.";
-
- test(function()
- {
- for (var i=0; i < CurrentTargets.length; i++)
- {
- CurrentTargets[i].addEventListener(EVENT, function(e){TestEvent(e, 0)}, true);
- CurrentTargets[i].addEventListener(EVENT, function(e){TestEvent(e, 1)}, true);
- }
-
- var evt = document.createEvent("Event");
- evt.initEvent(EVENT, true, true);
- TARGET.dispatchEvent(evt);
-
- assert_array_equals(ActualResult, ExpectResult, "ActualResult");
- assert_array_equals(ActualListeners, ExpectListeners, "ActualListeners");
-
- }, description);
-
- function TestEvent(evt, i)
- {
- ActualResult.push(evt.currentTarget);
- ActualListeners.push(i);
- if ((1 == evt.eventPhase) && (TABLE == evt.currentTarget) && (0 == i))
- {
- evt.stopImmediatePropagation();
- }
- }
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698