summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/resources/database-common.js
blob: d1eb4102e518cd9965e3ca0e4012b2a51d51fe78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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();
}