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

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

Issue 750013004: Added experimental tilt and tiltDirection to the Touch interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed WebInputEventConversionTest Created 5 years, 9 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.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 071b21217bf2098cce33443f64827f064323c154..1b649c9be90c555557b012758823b1ea92242b5a 100644
--- a/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
+++ b/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
@@ -9,7 +9,7 @@ box.style.height = "100px";
document.body.appendChild(box);
var target = document.getElementById("box");
-var touch = document.createTouch(window, target, 1, 100, 101, 102, 103, 5, 3, 10, 10);
+var touch = document.createTouch(window, target, 1, 100, 101, 102, 103, 5, 3, 10, 10, 45, 60);
shouldBeNonNull("touch");
shouldBe("touch.target", "box");
shouldBe("touch.identifier", "1");
@@ -24,6 +24,8 @@ shouldBe("touch.webkitRadiusX", "5");
shouldBe("touch.webkitRadiusY", "3");
shouldBe("touch.webkitRotationAngle", "10");
shouldBe("touch.webkitForce", "10");
+shouldBe("touch.tilt", "45");
+shouldBe("touch.tiltDirection", "60");
var emptyTouch = document.createTouch();
shouldBeNonNull("emptyTouch");
@@ -40,9 +42,11 @@ shouldBe("emptyTouch.webkitRadiusX", "0");
shouldBe("emptyTouch.webkitRadiusY", "0");
shouldBeNaN("emptyTouch.webkitRotationAngle");
shouldBeNaN("emptyTouch.webkitForce");
+shouldBeNaN("emptyTouch.tilt");
+shouldBeNaN("emptyTouch.tiltDirection");
// Try invoking with incorrect parameter types.
-var badParamsTouch = document.createTouch(function(x) { return x; }, 12, 'a', 'b', 'c', function(x) { return x; }, 104, 'a', 'b', 'c', 'd');
+var badParamsTouch = document.createTouch(function(x) { return x; }, 12, 'a', 'b', 'c', function(x) { return x; }, 104, 'a', 'b', 'c', 'd', 'e', 'f');
shouldBeNonNull("badParamsTouch");
shouldBeNull("badParamsTouch.target");
shouldBe("badParamsTouch.identifier", "0");
@@ -57,6 +61,8 @@ shouldBe("badParamsTouch.webkitRadiusX", "0");
shouldBe("badParamsTouch.webkitRadiusY", "0");
shouldBeNaN("badParamsTouch.webkitRotationAngle");
shouldBeNaN("badParamsTouch.webkitForce");
+shouldBeNaN("badParamsTouch.tilt");
+shouldBeNaN("badParamsTouch.tiltDirection");
// Should not crash when invoked on a detached Document.
var detachedTouch;
@@ -74,5 +80,7 @@ shouldBe("detachedTouch.webkitRadiusX", "0");
shouldBe("detachedTouch.webkitRadiusY", "0");
shouldBeNaN("detachedTouch.webkitRotationAngle");
shouldBeNaN("detachedTouch.webkitForce");
+shouldBeNaN("detachedTouch.tilt");
+shouldBeNaN("detachedTouch.tiltDirection");
isSuccessfullyParsed();
« no previous file with comments | « LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js ('k') | LayoutTests/fast/events/touch/touch-tilt.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698