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

Unified Diff: client/site_tests/power_LoadTest/testparams.html

Issue 2844047: Modify power_LoadTest Extension to pull in test parameters. (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: Set 1 hour long test. Created 9 years, 10 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: client/site_tests/power_LoadTest/testparams.html
diff --git a/client/site_tests/power_LoadTest/testparams.html b/client/site_tests/power_LoadTest/testparams.html
new file mode 100644
index 0000000000000000000000000000000000000000..6f89d8d53cc9a5dd6860792416ef757bf8807fb7
--- /dev/null
+++ b/client/site_tests/power_LoadTest/testparams.html
@@ -0,0 +1,52 @@
+<!---
+Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
Sameer Nanda 2011/02/28 22:11:34 change year to 2011
Benson Leung 2011/03/01 02:16:19 Done.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+--->
+
+<html>
+
+<body>
+Power Load Test Arguments :
+</body>
+
+<script src='params.js'>
+</script>
+
+<script>
+var data = "";
+
+function createDiv(id, data, hidden) {
+ var newdiv = document.createElement('div');
+ newdiv.setAttribute('id', id);
+ newdiv.innerText = data;
+ if (true == hidden)
+ newdiv.style.display = 'none';
+ document.body.appendChild(newdiv);
+}
+
+var customEvent = document.createEvent('Event');
+customEvent.initEvent('myCustomEvent', true, true);
+
+// Place customizable test arguments into divs
+createDiv('test_time_ms', test_time_ms, false);
+createDiv('should_scroll', should_scroll, false);
+createDiv('should_scroll_up', should_scroll_up, false);
+createDiv('scroll_loop', scroll_loop, false);
+createDiv('scroll_interval_ms', scroll_interval_ms, false);
+createDiv('scroll_by_pixels', scroll_by_pixels, false);
+createDiv('myCustomEventDiv', data, true);
+
+
+function fireCustomEvent(data) {
+ hiddenDiv2 = document.getElementById('myCustomEventDiv');
+ hiddenDiv2.innerText = data;
+ hiddenDiv2.dispatchEvent(customEvent);
+}
+
+data = "foo!";
+setTimeout(fireCustomEvent, 1000, data);
+
+</script>
+</html>
+
« client/site_tests/power_LoadTest/params.js ('K') | « client/site_tests/power_LoadTest/params.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698