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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <script> 6 <script>
7 description('Test for the Vibration API.'); 7 description('Test for the Vibration API.');
8 8
9 shouldBe("navigator.vibrate(0);", "undefined"); 9 shouldBeTrue("navigator.vibrate(0);");
10 shouldBe("navigator.vibrate([]);", "undefined"); 10 shouldBeTrue("navigator.vibrate([]);");
11 shouldBe("navigator.vibrate(1000);", "undefined"); 11 shouldBeTrue("navigator.vibrate(1);");
12 shouldBe("navigator.vibrate([1000, 300, 500]);", "undefined"); 12 shouldBeTrue("navigator.vibrate([1, 2]);");
13 shouldBe("navigator.vibrate(4294967295);", "undefined"); 13 shouldBeTrue("navigator.vibrate([1, 2, 3]);");
14 shouldBeTrue("navigator.vibrate(10000);");
15 shouldBeFalse("navigator.vibrate(10001);");
16 shouldBeFalse("navigator.vibrate(-1);");
17 shouldBeTrue("var p = []; for (var i = 0; i < 99; i++) p[i] = 1; navigator.vibra te(p);");
18 shouldBeFalse("var p = []; for (var i = 0; i < 100; i++) p[i] = 1; navigator.vib rate(p);");
14 shouldThrow("navigator.vibrate();"); 19 shouldThrow("navigator.vibrate();");
20 shouldThrow("navigator.vibrate([1], [2]);");
15 </script> 21 </script>
16 <script src="../js/resources/js-test-post.js"></script> 22 <script src="../js/resources/js-test-post.js"></script>
17 </body> 23 </body>
18 </html> 24 </html>
OLDNEW
« 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