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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/touch-events/touch-touchevent-constructor.html

Issue 2376103007: Import wpt@09907a9c4bcee14986431d53e4381384c7c69107 (Closed)
Patch Set: update platform expectations Created 4 years, 3 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/wpt/touch-events/touch-touchevent-constructor.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/touch-events/touch-touchevent-constructor.html b/third_party/WebKit/LayoutTests/imported/wpt/touch-events/touch-touchevent-constructor.html
index 01775a23191da827171c52c52ca779982595e97b..15b2db735fd0d7a01d9e9bd3a1f3719f790d62e5 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/touch-events/touch-touchevent-constructor.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/touch-events/touch-touchevent-constructor.html
@@ -10,9 +10,38 @@
<div id="target0"></div>
<script>
test(function() {
- assert_throws(new TypeError(), function() {new Touch();}, "Touch constructor requires initialize dictionary");
- assert_throws(new TypeError(), function() {new Touch({});}, "Touch constructor requires identifier and target");
-}, "Create a Touch object with insufficient properties");
+ var testIdentifier = 0;
+ var testTarget = document.getElementById('target0');
+
+ assert_throws(new TypeError(), function() {new Touch();}, "Touch constructor with no argument");
+ assert_throws(new TypeError(), function() {new Touch(null);}, "Touch constructor with null argument");
+ assert_throws(new TypeError(), function() {new Touch(undefined);}, "Touch constructor with undefined argument");
+ assert_throws(new TypeError(), function() {new Touch({});}, "Touch constructor with empty object");
+ assert_throws(new TypeError(), function() {new Touch({
+ identifier: testIdentifier
+ });}, "Touch constructor with only identifier");
+ assert_throws(new TypeError(), function() {new Touch({
+ target: testTarget
+ });}, "Touch constructor with only target");
+}, "Touch constructor with insufficient properties");
+
+test(function() {
+ var testIdentifier = 0;
+ var testTarget = document.getElementById('target0');
+
+ assert_throws(new TypeError(), function() {new Touch({
+ identifier: testIdentifier,
+ target: null
+ });}, "Touch constructor with null target");
+ assert_throws(new TypeError(), function() {new Touch({
+ identifier: testIdentifier,
+ target: undefined
+ });}, "Touch constructor with undefined target");
+ assert_throws(new TypeError(), function() {new Touch({
+ identifier: testIdentifier,
+ target: location
+ });}, "Touch constructor with Location target");
+}, "Touch constructor with non-EventTarget target");
test(function() {
var testIdentifier = 74;

Powered by Google App Engine
This is Rietveld 408576698