Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / websql / database-lock-after-reload.html
blob9acd429944225eaa732261776d3e0594cff17cb8
1 <html>
2 <head>
3 <script>
4 function log(message)
6 document.getElementById("console").innerHTML += message + "<br>";
9 function finishTest()
11 log("Test part 1 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 // Load a new page while the transaction is still in progress, interrupting the transaction.
27 // This should not leave the database locked and on the next page we should be able to insert
28 // some more data.
29 tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))", [],
30 function(tx, result) { location.href = "./resources/database-lock-after-reload-2.html"; },
31 function(tx, error) { errorFunction(error); });
32 tx.executeSql("INSERT INTO DataTest (testData) VALUES (ZEROBLOB(524200))");
33 }, errorFunction, function() { finishTest(); });
36 function runTest()
38 if (window.testRunner) {
39 testRunner.clearAllDatabases();
40 testRunner.dumpAsText();
41 testRunner.waitUntilDone();
44 var database;
45 try {
46 database = openDatabase("DatabaseLockTest", "1.0", "Test for database locking", 5242880);
47 } catch (e) {
48 log("Error - could not open database");
49 finishTest();
52 database.transaction(function(tx) {
53 log("Adding a table");
54 tx.executeSql("CREATE TABLE DataTest (testData)", [], function(tx, result) { },
55 function(tx, error) { errorFunction(error); });
56 }, errorFunction, function() { addData(database); });
59 </script>
60 </head>
62 <body onload="runTest()">
63 <pre id="console">
64 </pre>
65 </body>
67 </html>