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

Side by Side Diff: LayoutTests/fast/workers/storage/resources/open-database-creation-callback-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 var creationCallbackCalled1 = false;
2 var db1Name = "OpenDatabaseCreationCallback1" + (new Date()).getTime();
3 var db2Name = "OpenDatabaseCreationCallback2" + (new Date()).getTime();
4 var db1 = openDatabaseSync(db1Name, "1.0", "", 1,
5 function(db) {
6 postMessage("PASS: Creation callback was called." );
7 if (db.version != "")
8 postMessage("FAIL: Wrong version " + db.versi on + "; empty string expected.");
9 else
10 postMessage("PASS: Version set to empty strin g as expected.");
11 });
12
13 var db1Fail = null;
14 try {
15 db1Fail = openDatabaseSync(db1Name, "1.0", "", 1);
16 postMessage("FAIL: An INVALID_STATE_ERR exception should've been thrown.");
17 } catch(err) {
18 if (db1Fail)
19 postMessage("FAIL: db1Fail should have been null.");
20 else
21 postMessage("PASS: An exception was thrown and db1Fail is null as expect ed.");
22 }
23
24 // Open a handle to another database, first without a creation callback, then wi th one.
25 // Make sure the creation callback is not called.
26 var db2 = openDatabaseSync(db2Name, "1.0", "", 1);
27 db2 = openDatabaseSync(db2Name, "1.0", "", 1, function(db) { postMessage("FAIL: Creation callback should not have been called."); });
28
29 postMessage("done");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698