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

Side by Side Diff: tools/page_cycler/webpagereplay/extension/start.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | « tools/page_cycler/webpagereplay/extension/background.js ('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) 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 document.cookie = "__navigated_to_report=0; path=/"; 5 document.cookie = "__navigated_to_report=0; path=/";
6 document.cookie = "__pc_done=0; path=/"; 6 document.cookie = "__pc_done=0; path=/";
7 document.cookie = "__pc_timings=; path=/"; 7 document.cookie = "__pc_timings=; path=/";
8 8
9 function dirname(path) { 9 function dirname(path) {
10 var match = path.match(/(.*)\//); 10 var match = path.match(/(.*)\//);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (!config["shouldStart"]) { 64 if (!config["shouldStart"]) {
65 status_element.textContent = 65 status_element.textContent =
66 "Press 'Start' to continue (or load this page with 'auto=1')."; 66 "Press 'Start' to continue (or load this page with 'auto=1').";
67 return; 67 return;
68 } 68 }
69 69
70 try { 70 try {
71 var reportDir = dirname(dirname(window.location.pathname)) + "/common"; 71 var reportDir = dirname(dirname(window.location.pathname)) + "/common";
72 config["reportUrl"] = "file://" + reportDir + "/report.html"; 72 config["reportUrl"] = "file://" + reportDir + "/report.html";
73 config["isRecordMode"] = isRecordMode; 73 config["isRecordMode"] = isRecordMode;
74 var port = chrome.extension.connect(); 74 var port = chrome.runtime.connect();
75 port.postMessage({message: "start", benchmark: config}); 75 port.postMessage({message: "start", benchmark: config});
76 console.log("sending start message: page count, " + 76 console.log("sending start message: page count, " +
77 config["pageSets"].length); 77 config["pageSets"].length);
78 } catch(err) { 78 } catch(err) {
79 console.log("TryStart retrying after exception: " + err); 79 console.log("TryStart retrying after exception: " + err);
80 status_element.textContent = "Exception: " + err; 80 status_element.textContent = "Exception: " + err;
81 setTimeout(TryStart, 1000); 81 setTimeout(TryStart, 1000);
82 return; 82 return;
83 } 83 }
84 status_element.textContent = "STARTING"; 84 status_element.textContent = "STARTING";
85 } 85 }
86 86
87 // We wait before starting the test just to let chrome warm up better. 87 // We wait before starting the test just to let chrome warm up better.
88 setTimeout(TryStart, 250); 88 setTimeout(TryStart, 250);
OLDNEW
« no previous file with comments | « tools/page_cycler/webpagereplay/extension/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698