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

Unified Diff: LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js

Issue 23522051: Get rid of custom code for Document::createTouchList() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing references Created 7 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: LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js
diff --git a/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js b/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js
index 5ac01a5c8756a65c8bfa6047b41b5ae90a0b87e7..4ab1e9ec3bf34d5d7a28b9aba5811eefcc0cd41a 100644
--- a/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js
+++ b/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js
@@ -1,19 +1,10 @@
description("This test ensures that WebKit doesn't crash when the document.createTouchList API is called with non-Touch parameters");
-shouldBeNull('document.createTouchList(document).item(0)');
-shouldBeNull('document.createTouchList({"a":1}).item(0)');
-shouldBeNull('document.createTouchList(new Array(5)).item(0)');
-shouldBeNull('document.createTouchList("string").item(0)');
-shouldBeNull('document.createTouchList(null).item(0)');
-shouldBeNull('document.createTouchList(undefined).item(0)');
-
-var t = document.createTouch(window, document.body, 12341, 60, 65, 100, 105);
-var t2 = document.createTouch(window, document.body, 12342, 50, 55, 115, 120);
-var tl = document.createTouchList(t, document, t2);
-
-shouldBe('tl.length', '3');
-shouldBeNonNull('tl.item(0)');
-shouldBeNull('tl.item(1)');
-shouldBeNonNull('tl.item(2)');
+shouldThrow('document.createTouchList(document).item(0)', '"TypeError: Type error"');
+shouldThrow('document.createTouchList({"a":1}).item(0)', '"TypeError: Type error"');
+shouldThrow('document.createTouchList(new Array(5)).item(0)', '"TypeError: Type error"');
+shouldThrow('document.createTouchList("string").item(0)', '"TypeError: Type error"');
+shouldThrow('document.createTouchList(null).item(0)', '"TypeError: Type error"');
+shouldThrow('document.createTouchList(undefined).item(0)', '"TypeError: Type error"');
isSuccessfullyParsed();

Powered by Google App Engine
This is Rietveld 408576698