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

Side by Side Diff: chrome/test/data/webui/repeating_button_test.html

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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
« no previous file with comments | « chrome/test/data/webui/net_internals/events_view.js ('k') | chrome/test/data/webui/test_api.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Repeater</title> 4 <title>Repeater</title>
5 <script src="mock_timer.js"></script> 5 <script src="mock_timer.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 9
10 /** 10 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 /** 61 /**
62 * Simulates a mouse or touch event to the repeating button. 62 * Simulates a mouse or touch event to the repeating button.
63 * @param {string} type The type of event. 63 * @param {string} type The type of event.
64 */ 64 */
65 function mockEvent(type) { 65 function mockEvent(type) {
66 cr.dispatchSimpleEvent(button, type); 66 cr.dispatchSimpleEvent(button, type);
67 } 67 }
68 68
69 /** 69 /**
70 * Simulates a sequence of events. 70 * Simulates a sequence of events.
71 * @param {!Array.<string>} events List of event types. 71 * @param {!Array<string>} events List of event types.
72 * @param {!Array.<number>} timeIncrements List of time increments between 72 * @param {!Array<number>} timeIncrements List of time increments between
73 * events. 73 * events.
74 * @param {number} expectedValue Expected result. 74 * @param {number} expectedValue Expected result.
75 */ 75 */
76 function mockEventSequence(events, timeIncrements, expectedValue) { 76 function mockEventSequence(events, timeIncrements, expectedValue) {
77 assertEquals(events.length, timeIncrements.length); 77 assertEquals(events.length, timeIncrements.length);
78 buttonHeldCount = 0; 78 buttonHeldCount = 0;
79 for (var i = 0; i < events.length; i++) { 79 for (var i = 0; i < events.length; i++) {
80 mockEvent(events[i]); 80 mockEvent(events[i]);
81 mockTimer.tick(timeIncrements[i]); 81 mockTimer.tick(timeIncrements[i]);
82 } 82 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 function testLongRepeat() { 199 function testLongRepeat() {
200 var oldInterval = repeatInterval; 200 var oldInterval = repeatInterval;
201 repeatInterval = button.repeatInterval = 3 * button.repeatDelay; 201 repeatInterval = button.repeatInterval = 3 * button.repeatDelay;
202 testTouchHold(); 202 testTouchHold();
203 testMousePressHold(); 203 testMousePressHold();
204 repeatInterval = button.repeatInterval = oldInterval; 204 repeatInterval = button.repeatInterval = oldInterval;
205 } 205 }
206 </script> 206 </script>
207 </body> 207 </body>
208 </html> 208 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/webui/net_internals/events_view.js ('k') | chrome/test/data/webui/test_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698