blob: 4b736d7df3f835103abab042546d26e26dbce718 [file] [log] [blame]
Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Power Load Test Arguments :
<script src='params.js'>
var data = "";
function createDiv(id, data, hidden) {
var newdiv = document.createElement('div');
newdiv.setAttribute('id', id);
newdiv.innerText = data;
if (true == hidden) = 'none';
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('tasks', tasks, false);
createDiv('myCustomEventDiv', data, true);
function fireCustomEvent(data) {
hiddenDiv2 = document.getElementById('myCustomEventDiv');
hiddenDiv2.innerText = data;
data = "foo!";
setTimeout(fireCustomEvent, 1000, data);