summaryrefslogtreecommitdiffstats
path: root/tools/page_cycler
diff options
context:
space:
mode:
authorjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-05 23:59:23 +0000
committerjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-05 23:59:23 +0000
commit433f3edb01e1b8a3e58a115e40ac52ff00a61862 (patch)
tree51ee8c269182593bca6a684e4254327e09ed3ed9 /tools/page_cycler
parent33c2404e4ed51c2813f853c93231c19653e2b032 (diff)
downloadchromium_src-433f3edb01e1b8a3e58a115e40ac52ff00a61862.zip
chromium_src-433f3edb01e1b8a3e58a115e40ac52ff00a61862.tar.gz
chromium_src-433f3edb01e1b8a3e58a115e40ac52ff00a61862.tar.bz2
Log pages information to console.
It allows us to get pages information by monitoring the console outpt instead of printing by UI automation. BUG=None TEST=page cycler should still pass. Review URL: https://chromiumcodereview.appspot.com/9586006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/page_cycler')
-rw-r--r--tools/page_cycler/common/head.js7
-rw-r--r--tools/page_cycler/database/head.js7
-rw-r--r--tools/page_cycler/indexed_db/head.js7
3 files changed, 15 insertions, 6 deletions
diff --git a/tools/page_cycler/common/head.js b/tools/page_cycler/common/head.js
index fd7ce71..f12fb24 100644
--- a/tools/page_cycler/common/head.js
+++ b/tools/page_cycler/common/head.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -64,7 +64,10 @@ function __ontimeout() {
if (__cycle == (__pages().length * __iterations)) {
document.cookie = "__pc_done=1; path=/";
doc = "../../common/report.html";
- if (window.console) console.log("times: [" + __get_timings() + "]");
+ if (window.console) {
+ console.log("Pages: [" + __get_cookie('__pc_pages') + "]");
+ console.log("times: [" + __get_timings() + "]");
+ }
} else {
doc = "../" + __pages()[__page] + "/index.html";
}
diff --git a/tools/page_cycler/database/head.js b/tools/page_cycler/database/head.js
index ab0e91c..a36ce77 100644
--- a/tools/page_cycler/database/head.js
+++ b/tools/page_cycler/database/head.js
@@ -17,7 +17,7 @@ var TIMEOUT = 15;
* @return {string} The value of the given property, or empty string
* if the property was not found.
*/
-function getPropertyValue(name) {
+function __get_cookie(name) {
var cookies = document.cookie.split('; ');
for (var i = 0; i < cookies.length; ++i) {
var t = cookies[i].split('=');
@@ -68,7 +68,10 @@ function nextCycleOrResults() {
if (cycle == iterations) {
document.cookie = '__pc_done=1; path=/';
doc = '../../common/report.html';
- if (window.console) console.log("times: [" + __get_timings() + "]");
+ if (window.console) {
+ console.log("Pages: [" + __get_cookie('__pc_pages') + "]");
+ console.log("times: [" + __get_timings() + "]");
+ }
} else {
doc = 'index.html';
}
diff --git a/tools/page_cycler/indexed_db/head.js b/tools/page_cycler/indexed_db/head.js
index ab0e91c..a36ce77 100644
--- a/tools/page_cycler/indexed_db/head.js
+++ b/tools/page_cycler/indexed_db/head.js
@@ -17,7 +17,7 @@ var TIMEOUT = 15;
* @return {string} The value of the given property, or empty string
* if the property was not found.
*/
-function getPropertyValue(name) {
+function __get_cookie(name) {
var cookies = document.cookie.split('; ');
for (var i = 0; i < cookies.length; ++i) {
var t = cookies[i].split('=');
@@ -68,7 +68,10 @@ function nextCycleOrResults() {
if (cycle == iterations) {
document.cookie = '__pc_done=1; path=/';
doc = '../../common/report.html';
- if (window.console) console.log("times: [" + __get_timings() + "]");
+ if (window.console) {
+ console.log("Pages: [" + __get_cookie('__pc_pages') + "]");
+ console.log("times: [" + __get_timings() + "]");
+ }
} else {
doc = 'index.html';
}