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

Unified Diff: tools/page_cycler/webpagereplay/extension/page_cycler.js

Issue 160443004: Remove web page replay based pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: tools/page_cycler/webpagereplay/extension/page_cycler.js
diff --git a/tools/page_cycler/webpagereplay/extension/page_cycler.js b/tools/page_cycler/webpagereplay/extension/page_cycler.js
deleted file mode 100644
index 76869b2902ec9bd366e03d55ac73477ac9e549db..0000000000000000000000000000000000000000
--- a/tools/page_cycler/webpagereplay/extension/page_cycler.js
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Returns the sum of all values in the array.
-Array.sum = function(array) {
- var sum = 0;
- for (var i = array.length - 1; i >= 0; i--) {
- sum += array[i];
- }
- return sum;
-};
-
-
-function WriteReport(sessionLoader) {
- var iterations = window.iterations;
- var reportUrl = window.benchmarkConfiguration.reportUrl;
- var resultsCollection = sessionLoader.getResultsCollection();
- var times = resultsCollection.getTotalTimes();
- var pages = resultsCollection.getPages();
-
- reportUrl += "?n=" + iterations;
- reportUrl += "&i=" + iterations * pages.length; // "cycles"
- reportUrl += "&td=" + Array.sum(times); // total time
- reportUrl += "&tf=" + 0; // fudge time
- console.log('reportUrl: ' + reportUrl);
- chrome.cookies.set({
- "url": reportUrl,
- "name": "__pc_done",
- "value": "1",
- "path": "/",
- });
- chrome.cookies.set({
- "url": reportUrl,
- "name": "__pc_pages",
- "value": pages.map(function(x) {
- return x.replace(/=/g, "%3D");
- }).join(","),
- "path": "/",
- });
- chrome.cookies.set({
- "url": reportUrl,
- "name": "__pc_timings",
- "value": times.join(","),
- "path": "/",
- });
-
- chrome.tabs.getSelected(null, function(tab) {
- console.log("Navigate to the report.");
- chrome.tabs.update(tab.id, {"url": reportUrl}, null);
- });
-}
-
-AddBenchmarkCallback(WriteReport);

Powered by Google App Engine
This is Rietveld 408576698