summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortonyg@google.com <tonyg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 18:03:45 +0000
committertonyg@google.com <tonyg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 18:03:45 +0000
commita54e8115696da36621cb06388cc9589270abc00e (patch)
tree32042f63b6e0bf32458ff20b5a0fd6ffcbf87a27
parent1d6c6cc3610cf429ef3ce7880abeab184692450b (diff)
downloadchromium_src-a54e8115696da36621cb06388cc9589270abc00e.zip
chromium_src-a54e8115696da36621cb06388cc9589270abc00e.tar.gz
chromium_src-a54e8115696da36621cb06388cc9589270abc00e.tar.bz2
Fix indexed_db page cycler.
This was broken when the test switched over to being run with telemetry because telemetry waits for the document.readyState to be "complete" and a late document.write() causes the readyState to go back to "loading". This patch fixes that by changing the test's logging method to appending to a log div rather than document.write()ing after the page has loaded. BUG=235350 TEST=tools/perf/run_multipage_benchmarks --browser=system page_cycler tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json Review URL: https://codereview.chromium.org/14383008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196773 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/page_cycler/indexed_db/common.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/page_cycler/indexed_db/common.js b/tools/page_cycler/indexed_db/common.js
index 1af6611..18d3607 100644
--- a/tools/page_cycler/indexed_db/common.js
+++ b/tools/page_cycler/indexed_db/common.js
@@ -16,6 +16,17 @@ function setup() {
return false;
}
-function log(msg) {
- document.write(msg + '<br>');
+function getOrAddElement(id, type) {
+ var elem = document.getElementById(id);
+ if (!elem) {
+ elem = document.createElement(type);
+ elem.id = id;
+ document.body.appendChild(elem);
+ }
+ return elem;
}
+
+function log(msg) {
+ var logElem = getOrAddElement('logElem', 'DIV');
+ logElem.innerHTML += msg + '<br>';
+} \ No newline at end of file