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

Side by Side Diff: LayoutTests/vibration/vibration-utils.js

Issue 40443002: Add Vibration API layout tests that inspect internal state. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Address review comments. Created 7 years, 2 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
(Empty)
1 /**
2 * Creates a new array with length equal to [entries]. Each entry has the
3 * value [milliseconds].
4 */
5 function newPattern(milliseconds, entries) {
6 var pattern = new Array(entries);
7 for (var i = 0; i < entries; i++) {
8 pattern[i] = milliseconds;
9 }
10 return pattern;
11 }
12
13 /**
14 * Stop any currently running vibration. Call this to clean up internal state.
15 */
16 function stopVibration() {
17 navigator.vibrate(0);
18 }
OLDNEW
« no previous file with comments | « LayoutTests/vibration/vibration-patterns-expected.txt ('k') | Source/modules/vibration/NavigatorVibration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698