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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/persistence.js

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and linkage fix Created 5 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
1 if (this.importScripts) { 1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js'); 2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js'); 3 importScripts('shared.js');
4 } 4 }
5 5
6 description("Test IndexedDB persistence"); 6 description("Test IndexedDB persistence");
7 7
8 indexedDBTest(prepareDatabase, unexpectedSuccessCallback); 8 indexedDBTest(prepareDatabase, unexpectedSuccessCallback);
9 function prepareDatabase() 9 function prepareDatabase()
10 { 10 {
11 request = event.target; 11 request = event.target;
12 var db = request.result; 12 var db = request.result;
13 var trans = request.transaction; 13 var trans = request.transaction;
14 trans.abort(); 14 trans.abort();
15 request.onerror = function() { 15 request.onerror = function(evt) {
16 evt.preventDefault();
16 db.close(); 17 db.close();
17 first(); 18 first();
18 }; 19 };
19 } 20 }
20 21
21 function first() 22 function first()
22 { 23 {
23 openAndChangeVersion(1, function (connection) { 24 openAndChangeVersion(1, function (connection) {
24 db = connection; 25 db = connection;
25 shouldBe("db.version", "1"); 26 shouldBe("db.version", "1");
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 request.onupgradeneeded = function () { 100 request.onupgradeneeded = function () {
100 evalAndLog("db = request.result"); 101 evalAndLog("db = request.result");
101 shouldBeNonNull("db"); 102 shouldBeNonNull("db");
102 callback(db); 103 callback(db);
103 }; 104 };
104 request.onsuccess = function() { 105 request.onsuccess = function() {
105 evalAndLog("db.close()"); 106 evalAndLog("db.close()");
106 next(); 107 next();
107 } 108 }
108 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698