summaryrefslogtreecommitdiffstats
path: root/tools/page_cycler
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 23:52:26 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 23:52:26 +0000
commit8ed7a891af653ff984bfd9e53bd90c8c20e7c918 (patch)
tree4c947d828b0f2a6e840cb3e637e29398481f8896 /tools/page_cycler
parentada043062ea6fa6704af914f6f3dbb318efd88ce (diff)
downloadchromium_src-8ed7a891af653ff984bfd9e53bd90c8c20e7c918.zip
chromium_src-8ed7a891af653ff984bfd9e53bd90c8c20e7c918.tar.gz
chromium_src-8ed7a891af653ff984bfd9e53bd90c8c20e7c918.tar.bz2
Make the page cycler test support the new API (and the old).
BUG=73013 TEST=page_cycler_tests --gtest_filter="PageCyclerIndexedDatabase*" Review URL: http://codereview.chromium.org/6528025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/page_cycler')
-rw-r--r--tools/page_cycler/indexed_db/basic_insert/index.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/page_cycler/indexed_db/basic_insert/index.html b/tools/page_cycler/indexed_db/basic_insert/index.html
index cd8b3e1..93965abf 100644
--- a/tools/page_cycler/indexed_db/basic_insert/index.html
+++ b/tools/page_cycler/indexed_db/basic_insert/index.html
@@ -8,7 +8,9 @@
var failed = false;
function error(event) {
- log('Error ' + event.code + ': ' + event.message);
+ // TODO(jorlow): Remove the old non-event.target part.
+ log('Error ' + (event.code || event.target.errorCode) + ': '
+ + (event.message || event.target.webkitErrorMessage));
if (!failed)
testComplete(TEST_FAILED);
@@ -25,7 +27,8 @@
}
function onOpen() {
- window.db = event.result;
+ // TODO(jorlow): Remove the old non-event.target part.
+ window.db = event.result || event.target.result;
var request = db.setVersion('1');
request.onerror = error;
@@ -33,7 +36,8 @@
}
function onSetVersion() {
- var transaction = event.result;
+ // TODO(jorlow): Remove the old non-event.target part.
+ var transaction = event.result || event.target.result;
transaction.onerror = error;
transaction.oncomplete = storeCreated;
@@ -44,7 +48,7 @@
}
function storeCreated() {
- var transaction = db.transaction([], IDBTransaction.READ_WRITE, 0);
+ var transaction = db.transaction([], IDBTransaction.READ_WRITE);
transaction.oncomplete = insertsDone;
transaction.onabort = error;