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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/events/Event-constructors.html

Issue 1988983002: Move the dom directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dom/events/Event-constructors.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/events/Event-constructors.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/events/Event-constructors.html
deleted file mode 100644
index 5732d7f36a083689e65fa8b7b6a9a39c93c71875..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/events/Event-constructors.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!doctype html>
-<title>Event constructors</title>
-<script src=../../../../resources/testharness.js></script>
-<script src=../../../../resources/testharnessreport.js></script>
-<div id=log></div>
-<script>
-test(function() {
- assert_throws(new TypeError(), function() {
- new Event()
- })
-})
-test(function() {
- var test_error = { name: "test" }
- assert_throws(test_error, function() {
- new Event({ toString: function() { throw test_error; } })
- })
-})
-test(function() {
- var ev = new Event("")
- assert_equals(ev.type, "")
- assert_equals(ev.target, null)
- assert_equals(ev.currentTarget, null)
- assert_equals(ev.eventPhase, Event.NONE)
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, false)
- assert_equals(ev.defaultPrevented, false)
- assert_equals(ev.isTrusted, false)
- assert_true(ev.timeStamp > 0)
- assert_true("initEvent" in ev)
-})
-test(function() {
- var ev = new Event("test")
- assert_equals(ev.type, "test")
- assert_equals(ev.target, null)
- assert_equals(ev.currentTarget, null)
- assert_equals(ev.eventPhase, Event.NONE)
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, false)
- assert_equals(ev.defaultPrevented, false)
- assert_equals(ev.isTrusted, false)
- assert_true(ev.timeStamp > 0)
- assert_true("initEvent" in ev)
-})
-test(function() {
- assert_throws(new TypeError(), function() { Event("test") },
- 'Calling Event constructor without "new" must throw');
-})
-test(function() {
- var ev = new Event("I am an event", { bubbles: true, cancelable: false})
- assert_equals(ev.type, "I am an event")
- assert_equals(ev.bubbles, true)
- assert_equals(ev.cancelable, false)
-})
-test(function() {
- var ev = new Event("@", { bubblesIGNORED: true, cancelable: true})
- assert_equals(ev.type, "@")
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, true)
-})
-test(function() {
- var ev = new Event("@", { "bubbles\0IGNORED": true, cancelable: true})
- assert_equals(ev.type, "@")
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, true)
-})
-test(function() {
- var ev = new Event("Xx", { cancelable: true})
- assert_equals(ev.type, "Xx")
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, true)
-})
-test(function() {
- var ev = new Event("Xx", {})
- assert_equals(ev.type, "Xx")
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, false)
-})
-test(function() {
- var ev = new Event("Xx", {bubbles: true, cancelable: false, sweet: "x"})
- assert_equals(ev.type, "Xx")
- assert_equals(ev.bubbles, true)
- assert_equals(ev.cancelable, false)
- assert_equals(ev.sweet, undefined)
-})
-test(function() {
- var called = []
- var ev = new Event("Xx", {
- get cancelable() {
- called.push("cancelable")
- return false
- },
- get bubbles() {
- called.push("bubbles")
- return true;
- },
- get sweet() {
- called.push("sweet")
- return "x"
- }
- })
- assert_array_equals(called, ["bubbles", "cancelable"])
- assert_equals(ev.type, "Xx")
- assert_equals(ev.bubbles, true)
- assert_equals(ev.cancelable, false)
- assert_equals(ev.sweet, undefined)
-})
-test(function() {
- var ev = new CustomEvent("$", {detail: 54, sweet: "x", sweet2: "x", cancelable:true})
- assert_equals(ev.type, "$")
- assert_equals(ev.bubbles, false)
- assert_equals(ev.cancelable, true)
- assert_equals(ev.sweet, undefined)
- assert_equals(ev.detail, 54)
-})
-</script>

Powered by Google App Engine
This is Rietveld 408576698