Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / websql / resources / database-lock-after-reload-2.html
blob68c52e154eeef1bde3a354c6095b73ba01c017a5
1 <html>
2 <head>
3 <script>
4 function log(message)
6 document.getElementById("console").innerHTML += message + "<br>";
9 function finishTest()
11 log("Test part 2 Complete");
12 if (window.testRunner)
13 testRunner.notifyDone();
16 function errorFunction(error)
18 log("Test failed - " + error.message);
19 finishTest();
22 function addData(db)
24 db.transaction(function(tx) {
25 log("Inserting some data");
26 tx.executeSql("INSERT INTO DataTest (testData) VALUES (?)", ["A"],
27 function(tx, result) { }, function(tx, error) { errorFunction(error); });
28 }, function() { }, function() { finishTest(); });
31 function runTest()
33 if (window.testRunner) {
34 testRunner.dumpAsText();
35 testRunner.waitUntilDone();
38 try {
39 var database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
40 addData(database);
41 } catch(e) {
42 log("Error - could not open database");
43 finishTest();
47 </script>
48 </head>
50 <body onload="runTest()">
51 <pre id="console">
52 </pre>
53 </body>
55 </html>