OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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; |
11 var __results = false; | 11 var __results = false; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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=/"; |
78 return; | 80 return; |
| 81 } |
79 var unused = document.body.offsetHeight; // force layout | 82 var unused = document.body.offsetHeight; // force layout |
80 | 83 |
81 var ts = 0, td = 0, te = (new Date()).getTime(), tf = 0; | 84 var ts = 0, td = 0, te = (new Date()).getTime(), tf = 0; |
82 | 85 |
83 var s = document.location.search; | 86 var s = document.location.search; |
84 if (s) { | 87 if (s) { |
85 var params = s.substring(1).split('&'); | 88 var params = s.substring(1).split('&'); |
86 for (var i = 0; i < params.length; ++i) { | 89 for (var i = 0; i < params.length; ++i) { |
87 var f = params[i].split('='); | 90 var f = params[i].split('='); |
88 switch (f[0]) { | 91 switch (f[0]) { |
(...skipping 26 matching lines...) Expand all Loading... |
115 __te = te; | 118 __te = te; |
116 __tf = tf; // record t-fudge | 119 __tf = tf; // record t-fudge |
117 | 120 |
118 setTimeout("__ontimeout()", __TIMEOUT); | 121 setTimeout("__ontimeout()", __TIMEOUT); |
119 } | 122 } |
120 | 123 |
121 if (window.attachEvent) | 124 if (window.attachEvent) |
122 window.attachEvent("onload", __onload); | 125 window.attachEvent("onload", __onload); |
123 else | 126 else |
124 addEventListener("load", __onload, false); | 127 addEventListener("load", __onload, false); |
OLD | NEW |