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

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

Issue 392223003: Handle "frame-less" creation of Touch objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « LayoutTests/fast/events/touch/document-create-touch-expected.txt ('k') | Source/core/dom/Touch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/script-tests/document-create-touch.js
diff --git a/LayoutTests/fast/events/touch/script-tests/document-create-touch.js b/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
index bf2986e31c14f2d13a460a1eda645d96569bc410..071b21217bf2098cce33443f64827f064323c154 100644
--- a/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
+++ b/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
@@ -57,4 +57,22 @@ shouldBe("badParamsTouch.webkitRadiusX", "0");
shouldBe("badParamsTouch.webkitRadiusY", "0");
shouldBeNaN("badParamsTouch.webkitRotationAngle");
shouldBeNaN("badParamsTouch.webkitForce");
+
+// Should not crash when invoked on a detached Document.
+var detachedTouch;
+shouldBeNonNull("detachedTouch = document.implementation.createDocument('a', 'b').createTouch()");
+shouldBeNull("detachedTouch.target");
+shouldBe("detachedTouch.identifier", "0");
+shouldBe("detachedTouch.pageX", "0");
+shouldBe("detachedTouch.pageY", "0");
+shouldBe("detachedTouch.screenX", "0");
+shouldBe("detachedTouch.screenY", "0");
+shouldBe("detachedTouch.radiusX", "0");
+shouldBe("detachedTouch.radiusY", "0");
+shouldBeNaN("detachedTouch.force");
+shouldBe("detachedTouch.webkitRadiusX", "0");
+shouldBe("detachedTouch.webkitRadiusY", "0");
+shouldBeNaN("detachedTouch.webkitRotationAngle");
+shouldBeNaN("detachedTouch.webkitForce");
+
isSuccessfullyParsed();
« no previous file with comments | « LayoutTests/fast/events/touch/document-create-touch-expected.txt ('k') | Source/core/dom/Touch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698