OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // start.js sends a "start" message to set this. | 5 // start.js sends a "start" message to set this. |
6 window.benchmarkConfiguration = {}; | 6 window.benchmarkConfiguration = {}; |
7 | 7 |
8 // The callback (e.g. report writer) is set via AddBenchmarckCallback. | 8 // The callback (e.g. report writer) is set via AddBenchmarckCallback. |
9 window.benchmarkCallback; | 9 window.benchmarkCallback; |
10 | 10 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 window.timeout = 40000; | 311 window.timeout = 40000; |
312 window.retries = 2; | 312 window.retries = 2; |
313 } else { | 313 } else { |
314 window.iterations = benchmarkConfiguration["iterations"] || 3; | 314 window.iterations = benchmarkConfiguration["iterations"] || 3; |
315 } | 315 } |
316 var sessionLoader = new SessionLoader(benchmarkCallback); | 316 var sessionLoader = new SessionLoader(benchmarkCallback); |
317 console.log("pageSets: " + JSON.stringify(benchmarkConfiguration.pageSets)); | 317 console.log("pageSets: " + JSON.stringify(benchmarkConfiguration.pageSets)); |
318 sessionLoader.run(); | 318 sessionLoader.run(); |
319 } | 319 } |
320 | 320 |
321 chrome.extension.onConnect.addListener(function(port) { | 321 chrome.runtime.onConnect.addListener(function(port) { |
322 port.onMessage.addListener(function(data) { | 322 port.onMessage.addListener(function(data) { |
323 if (data.message == "start") { | 323 if (data.message == "start") { |
324 window.benchmarkConfiguration = data.benchmark; | 324 window.benchmarkConfiguration = data.benchmark; |
325 Run() | 325 Run() |
326 } | 326 } |
327 }); | 327 }); |
328 }); | 328 }); |
OLD | NEW |