summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/resources
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/storage/resources')
-rw-r--r--LayoutTests/storage/resources/database-common.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/LayoutTests/storage/resources/database-common.js b/LayoutTests/storage/resources/database-common.js
new file mode 100644
index 0000000..d1eb410
--- /dev/null
+++ b/LayoutTests/storage/resources/database-common.js
@@ -0,0 +1,29 @@
+var DB_TEST_SUFFIX = "_dom";
+
+function openDatabaseWithSuffix(name, version, description, size, callback)
+{
+ if (arguments.length > 4) {
+ return openDatabase(name + DB_TEST_SUFFIX, version, description, size, callback);
+ } else {
+ return openDatabase(name + DB_TEST_SUFFIX, version, description, size);
+ }
+}
+
+function log(message)
+{
+ document.getElementById("console").innerText += message + "\n";
+}
+
+function setLocationHash(hash) {
+ location.hash = hash;
+}
+
+function setupAndRunTest()
+{
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+ document.getElementById("console").innerText = "";
+ runTest();
+}