Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: LayoutTests/fast/workers/storage/resources/multiple-transactions-on-different-handles-sync.js

Issue 561093003: Remove worker support of Web SQL Database. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 function runTransaction(db)
2 {
3 db.transaction(function(tx) {
4 // Execute a read-only statement
5 tx.executeSql("SELECT COUNT(*) FROM Test;");
6
7 // Execute a write statement to make sure SQLite tries to acquire an excl usive lock on the DB file
8 tx.executeSql("INSERT INTO Test VALUES (?);", [1]);
9 });
10 }
11
12 var db1 = openDatabaseSync("MultipleTransactionsOnDifferentHandlesTest", "1.0",
13 "Test transactions on different handles to the same D B.", 1);
14 db1.transaction(function(tx) {
15 tx.executeSql("CREATE TABLE IF NOT EXISTS Test (Foo int);");
16 });
17
18 var db2 = openDatabaseSync("MultipleTransactionsOnDifferentHandlesTest", "1.0",
19 "Test transactions on different handles to the same D B.", 1);
20 if (db1 == db2)
21 postMessage("FAIL: db1 == db2");
22 else {
23 try {
24 runTransaction(db1);
25 runTransaction(db2);
26 postMessage("PASS");
27 } catch (err) {
28 postMessage("FAIL: " + err);
29 }
30 }
31
32 postMessage("done");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698