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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Window/script-tests/dispatchEvent.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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/fast/dom/Window/script-tests/dispatchEvent.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Window/script-tests/dispatchEvent.js b/third_party/WebKit/LayoutTests/fast/dom/Window/script-tests/dispatchEvent.js
deleted file mode 100644
index 1b521db63041fceb198fd900e8abd65963af3a2b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Window/script-tests/dispatchEvent.js
+++ /dev/null
@@ -1,40 +0,0 @@
-description("Test window.dispatchEvent().");
-
-// Test that non-events throw
-var event = {};
-shouldThrow("window.dispatchEvent(event)");
-
-// Test that non-initialized events throw
-event = document.createEvent("Event");
-shouldThrow("window.dispatchEvent(event)");
-
-// Test basic dispatch
-var myEventDispatched = false;
-var target;
-var currentTarget;
-window.addEventListener("myEvent", function(evt) {
- myEventDispatched = true;
- target = evt.target;
- currentTarget = evt.currentTarget;
-}, false);
-event = document.createEvent("Event");
-event.initEvent("myEvent", false, false);
-window.dispatchEvent(event);
-shouldBeTrue("myEventDispatched");
-shouldBe("target", "window");
-shouldBe("currentTarget", "window");
-
-// Test that both useCapture and non-useCapture listeners are dispatched to
-var useCaptureDispatched = false;
-window.addEventListener("myEvent", function(evt) {
- useCaptureDispatched = true;
-}, true);
-var nonUseCaptureDispatched = false;
-window.addEventListener("myEvent", function(evt) {
- nonUseCaptureDispatched = true;
-}, false);
-event = document.createEvent("Event");
-event.initEvent("myEvent", false, false);
-window.dispatchEvent(event);
-shouldBeTrue("useCaptureDispatched");
-shouldBeTrue("nonUseCaptureDispatched");

Powered by Google App Engine
This is Rietveld 408576698