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

Side by Side Diff: tools/page_cycler/common/head.js

Issue 7941010: Revert r101718 "wait for test script to be loaded" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/perf/page_cycler_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var __c = ""; // that's good enough for me. 5 var __c = ""; // that's good enough for me.
6 var __td; 6 var __td;
7 var __tf; 7 var __tf;
8 var __tl; 8 var __tl;
9 var __iterations; 9 var __iterations;
10 var __cycle; 10 var __cycle;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (window.console) console.log("times: [" + __get_timings() + "]"); 67 if (window.console) console.log("times: [" + __get_timings() + "]");
68 } else { 68 } else {
69 doc = "../" + __pages()[__page] + "/index.html"; 69 doc = "../" + __pages()[__page] + "/index.html";
70 } 70 }
71 71
72 var url = doc + "?n=" + __iterations + "&i=" + __cycle + "&p=" + __page + 72 var url = doc + "?n=" + __iterations + "&i=" + __cycle + "&p=" + __page +
73 "&ts=" + ts + "&td=" + __td + "&tf=" + __tf; 73 "&ts=" + ts + "&td=" + __td + "&tf=" + __tf;
74 document.location.href = url; 74 document.location.href = url;
75 } 75 }
76 function __onload() { 76 function __onload() {
77 if (__results) { 77 if (__results)
78 // Set a variable to indicate that the result report page is loaded.
79 document.cookie = " __navigated_to_report=1; path=/";
80 return; 78 return;
81 }
82 var unused = document.body.offsetHeight; // force layout 79 var unused = document.body.offsetHeight; // force layout
83 80
84 var ts = 0, td = 0, te = (new Date()).getTime(), tf = 0; 81 var ts = 0, td = 0, te = (new Date()).getTime(), tf = 0;
85 82
86 var s = document.location.search; 83 var s = document.location.search;
87 if (s) { 84 if (s) {
88 var params = s.substring(1).split('&'); 85 var params = s.substring(1).split('&');
89 for (var i = 0; i < params.length; ++i) { 86 for (var i = 0; i < params.length; ++i) {
90 var f = params[i].split('='); 87 var f = params[i].split('=');
91 switch (f[0]) { 88 switch (f[0]) {
(...skipping 26 matching lines...) Expand all
118 __te = te; 115 __te = te;
119 __tf = tf; // record t-fudge 116 __tf = tf; // record t-fudge
120 117
121 setTimeout("__ontimeout()", __TIMEOUT); 118 setTimeout("__ontimeout()", __TIMEOUT);
122 } 119 }
123 120
124 if (window.attachEvent) 121 if (window.attachEvent)
125 window.attachEvent("onload", __onload); 122 window.attachEvent("onload", __onload);
126 else 123 else
127 addEventListener("load", __onload, false); 124 addEventListener("load", __onload, false);
OLDNEW
« no previous file with comments | « chrome/test/perf/page_cycler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698