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

Unified Diff: LayoutTests/fast/dom/navigator-vibration.html

Issue 15724023: Vibration API: use runtime flag, change from client to platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 6 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/dom/navigator-vibration.html
diff --git a/LayoutTests/fast/dom/navigator-vibration.html b/LayoutTests/fast/dom/navigator-vibration.html
index b2220b9f4864259b6435d7f42bb13d3c286935ee..546c88c3c3222c2f56514880cf5781fa5bb446cf 100644
--- a/LayoutTests/fast/dom/navigator-vibration.html
+++ b/LayoutTests/fast/dom/navigator-vibration.html
@@ -6,12 +6,18 @@
<script>
description('Test for the Vibration API.');
-shouldBe("navigator.vibrate(0);", "undefined");
-shouldBe("navigator.vibrate([]);", "undefined");
-shouldBe("navigator.vibrate(1000);", "undefined");
-shouldBe("navigator.vibrate([1000, 300, 500]);", "undefined");
-shouldBe("navigator.vibrate(4294967295);", "undefined");
+shouldBeTrue("navigator.vibrate(0);");
+shouldBeTrue("navigator.vibrate([]);");
+shouldBeTrue("navigator.vibrate(1);");
+shouldBeTrue("navigator.vibrate([1, 2]);");
+shouldBeTrue("navigator.vibrate([1, 2, 3]);");
+shouldBeTrue("navigator.vibrate(10000);");
+shouldBeFalse("navigator.vibrate(10001);");
+shouldBeFalse("navigator.vibrate(-1);");
+shouldBeTrue("var p = []; for (var i = 0; i < 99; i++) p[i] = 1; navigator.vibrate(p);");
+shouldBeFalse("var p = []; for (var i = 0; i < 100; i++) p[i] = 1; navigator.vibrate(p);");
shouldThrow("navigator.vibrate();");
+shouldThrow("navigator.vibrate([1], [2]);");
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
« no previous file with comments | « LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt ('k') | LayoutTests/fast/dom/navigator-vibration-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698