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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/order-of-events/init-event-while-dispatching.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/order-of-events/init-event-while-dispatching.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/order-of-events/init-event-while-dispatching.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/order-of-events/init-event-while-dispatching.html
deleted file mode 100644
index 9306e082f656b83b8584c0ff2f0c8929475500ca..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/uievents/order-of-events/init-event-while-dispatching.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Re-initializing events while dispatching them</title>
-<link rel="author" title="Josh Matthews" href="mailto:josh@joshmatthews.net">
-<script src="../../../../resources/testharness.js"></script>
-<script src="../../../../resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-var events = {
- 'KeyboardEvent': {
- 'constructor': function() { return new KeyboardEvent("type", {key: "A"}); },
- 'init': function(ev) { ev.initKeyboardEvent("type2", true, true, null, "a", 1, "", true, "") },
- 'check': function(ev) {
- assert_equals(ev.key, "A", "initKeyboardEvent key setter should short-circuit");
- assert_false(ev.repeat, "initKeyboardEvent repeat setter should short-circuit");
- assert_equals(ev.location, 0, "initKeyboardEvent location setter should short-circuit");
- }
- },
- 'MouseEvent': {
- 'constructor': function() { return new MouseEvent("type"); },
- 'init': function(ev) { ev.initMouseEvent("type2", true, true, null, 0, 1, 1, 1, 1, true, true, true, true, 1, null) },
- 'check': function(ev) {
- assert_equals(ev.screenX, 0, "initMouseEvent screenX setter should short-circuit");
- assert_equals(ev.screenY, 0, "initMouseEvent screenY setter should short-circuit");
- assert_equals(ev.clientX, 0, "initMouseEvent clientX setter should short-circuit");
- assert_equals(ev.clientY, 0, "initMouseEvent clientY setter should short-circuit");
- assert_false(ev.ctrlKey, "initMouseEvent ctrlKey setter should short-circuit");
- assert_false(ev.altKey, "initMouseEvent altKey setter should short-circuit");
- assert_false(ev.shiftKey, "initMouseEvent shiftKey setter should short-circuit");
- assert_false(ev.metaKey, "initMouseEvent metaKey setter should short-circuit");
- assert_equals(ev.button, 0, "initMouseEvent button setter should short-circuit");
- }
- },
- 'CustomEvent': {
- 'constructor': function() { return new CustomEvent("type") },
- 'init': function(ev) { ev.initCustomEvent("type2", true, true, 1) },
- 'check': function(ev) {
- assert_equals(ev.detail, null, "initCustomEvent detail setter should short-circuit");
- }
- },
- 'UIEvent': {
- 'constructor': function() { return new UIEvent("type") },
- 'init': function(ev) { ev.initUIEvent("type2", true, true, window, 1) },
- 'check': function(ev) {
- assert_equals(ev.view, null, "initUIEvent view setter should short-circuit");
- assert_equals(ev.detail, 0, "initUIEvent detail setter should short-circuit");
- }
- },
- 'Event': {
- 'constructor': function() { return new Event("type") },
- 'init': function(ev) { ev.initEvent("type2", true, true) },
- 'check': function(ev) {
- assert_equals(ev.bubbles, false, "initEvent bubbles setter should short-circuit");
- assert_equals(ev.cancelable, false, "initEvent cancelable setter should short-circuit");
- assert_equals(ev.type, "type", "initEvent type setter should short-circuit");
- }
- }
-};
-
-var names = Object.keys(events);
-for (var i = 0; i < names.length; i++) {
- var t = async_test("Calling init" + names[i] + " while dispatching.");
- t.step(function() {
- var e = events[names[i]].constructor();
-
- var target = document.createElement("div")
- target.addEventListener("type", t.step_func(function() {
- events[names[i]].init(e);
-
- var o = e;
- while ((o = Object.getPrototypeOf(o))) {
- if (!(o.constructor.name in events)) {
- break;
- }
- events[o.constructor.name].check(e);
- }
- }), false);
-
- assert_equals(target.dispatchEvent(e), true, "dispatchEvent must return true")
- });
- t.done();
-}
-</script>

Powered by Google App Engine
This is Rietveld 408576698