| OLD | NEW |
| 1 <style> | 1 <style> |
| 2 #options { | 2 #options { |
| 3 position: absolute; | 3 position: absolute; |
| 4 background-color: #FFFFCC; | 4 background-color: #FFFFCC; |
| 5 display: none; | 5 display: none; |
| 6 font-family: "Courier New"; | 6 font-family: "Courier New"; |
| 7 font-size: 9pt; | 7 font-size: 9pt; |
| 8 padding: 5px; | 8 padding: 5px; |
| 9 border: 1px solid #CCCC88; | 9 border: 1px solid #CCCC88; |
| 10 z-index: 3; | 10 z-index: 3; |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 if (data.message == "load") { | 315 if (data.message == "load") { |
| 316 var benchmark = findBenchmark(data.url); | 316 var benchmark = findBenchmark(data.url); |
| 317 if (benchmark != undefined && benchmark.isRunning()) { | 317 if (benchmark != undefined && benchmark.isRunning()) { |
| 318 benchmark.pageFinished(data.values); | 318 benchmark.pageFinished(data.values); |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 }); | 321 }); |
| 322 }); | 322 }); |
| 323 | 323 |
| 324 function run() { | 324 function run() { |
| 325 if (window.clearCache) { |
| 326 // Show a warning if we will try to clear the cache between runs |
| 327 // but will also be reusing the same WebKit instance (i.e. Chrome |
| 328 // is in single-process mode, or 'Use New Tabs' is turned off) |
| 329 // because the WebKit cache might not get completely cleared between runs. |
| 330 if (chrome.benchmarking.isSingleProcess()) { |
| 331 alert("Warning: the WebKit cache may not be cleared correctly " + |
| 332 "between runs because Chrome is running in single-process mode."); |
| 333 } else if (!window.useNewTabs) { |
| 334 alert("Warning: the WebKit cache may not be cleared correctly " + |
| 335 "between runs because 'Use New Tabs Per Page' is turned off."); |
| 336 } |
| 337 } |
| 338 |
| 325 var urls = testUrl.split(","); | 339 var urls = testUrl.split(","); |
| 326 for (var i = 0; i < urls.length; i++) { | 340 for (var i = 0; i < urls.length; i++) { |
| 327 var benchmark = new Benchmark(); | 341 var benchmark = new Benchmark(); |
| 328 benchmark.start(urls[i]); // XXXMB - move to constructor | 342 benchmark.start(urls[i]); // XXXMB - move to constructor |
| 329 } | 343 } |
| 330 benchmarks[0].runPage(); | 344 benchmarks[0].runPage(); |
| 331 } | 345 } |
| 332 | 346 |
| 333 // Run at startup | 347 // Run at startup |
| 334 chrome.windows.getCurrent(function(currentWindow) { | 348 chrome.windows.getCurrent(function(currentWindow) { |
| 335 window.windowId = currentWindow.id; | 349 window.windowId = currentWindow.id; |
| 336 }); | 350 }); |
| 337 </script> | 351 </script> |
| OLD | NEW |