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

Side by Side Diff: client/site_tests/power_LoadTest/extension/testparams.js

Issue 2844047: Modify power_LoadTest Extension to pull in test parameters. (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: Increase # loops to 11 (yay!) Created 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // External Test Parameters Content Script!
6
7 // initial values.
8 var test_time_ms = 0;
9 var should_scroll = false;
10 var should_scroll_up = false;
11 var scroll_loop = false;
12 var scroll_interval_ms = 0;
13 var scroll_by_pixels = 0;
14
15 document.getElementById('myCustomEventDiv').addEventListener('myCustomEvent',
16 function() {
17 // pull our test parameters from divs on this page.
18 var eventData = document.getElementById('myCustomEventDiv').innerText;
19 test_time_ms = document.getElementById('test_time_ms').innerText;
20 should_scroll = document.getElementById('should_scroll').innerText;
21 should_scroll_up = document.getElementById('should_scroll_up').innerText;
22 scroll_loop = document.getElementById('scroll_loop').innerText;
23 scroll_interval_ms = document.getElementById('scroll_interval_ms').innerText ;
24 scroll_by_pixels = document.getElementById('scroll_by_pixels').innerText;
25
26 // pass to background page via sendRequest.
27 var request = { _test_time_ms : test_time_ms,
28 _should_scroll : should_scroll,
29 _should_scroll_up : should_scroll_up,
30 _scroll_loop : scroll_loop,
31 _scroll_interval_ms : scroll_interval_ms,
32 _scroll_by_pixels : scroll_by_pixels
33 }
34 chrome.extension.sendRequest(request);
35 }
36 );
37
OLDNEW
« no previous file with comments | « client/site_tests/power_LoadTest/extension/params.js ('k') | client/site_tests/power_LoadTest/params.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698