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

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

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Include error name Created 6 years, 8 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 database metadata mutation/snapshotting"); 6 description("Test IndexedDB database metadata mutation/snapshotting");
7 7
8 indexedDBTest(prepareDatabase, snapshotConnection1); 8 indexedDBTest(prepareDatabase, snapshotConnection1);
9 function prepareDatabase() 9 function prepareDatabase()
10 { 10 {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 shouldBe("connection3.version", "3"); 65 shouldBe("connection3.version", "3");
66 shouldBe("connection3.objectStoreNames.length", "3"); 66 shouldBe("connection3.objectStoreNames.length", "3");
67 shouldBe("connection3store1.indexNames.length", "3"); 67 shouldBe("connection3store1.indexNames.length", "3");
68 68
69 trans.oncomplete = unexpectedCompleteCallback; 69 trans.oncomplete = unexpectedCompleteCallback;
70 debug("Connection's properties should be reverted on abort"); 70 debug("Connection's properties should be reverted on abort");
71 evalAndLog("trans.abort()"); 71 evalAndLog("trans.abort()");
72 }; 72 };
73 request.onerror = function() { 73 request.onerror = function() {
74 expectError();
74 debug("Connection's properties should be snapshotted on close"); 75 debug("Connection's properties should be snapshotted on close");
75 evalAndLog("connection3.close()"); 76 evalAndLog("connection3.close()");
76 fourthOpen(); 77 fourthOpen();
77 } 78 };
78 } 79 }
79 80
80 function fourthOpen() 81 function fourthOpen()
81 { 82 {
82 debug(""); 83 debug("");
83 debug("fourthOpen():"); 84 debug("fourthOpen():");
84 evalAndLog("request = indexedDB.open(dbname, 4)"); 85 evalAndLog("request = indexedDB.open(dbname, 4)");
85 request.onerror = unexpectedErrorCallback; 86 request.onerror = unexpectedErrorCallback;
86 request.onupgradeneeded = function() { 87 request.onupgradeneeded = function() {
87 evalAndLog("connection4 = request.result"); 88 evalAndLog("connection4 = request.result");
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 shouldBe("connection3store1.indexNames.length", "2"); 122 shouldBe("connection3store1.indexNames.length", "2");
122 debug(""); 123 debug("");
123 124
124 shouldBe("connection4.version", "4"); 125 shouldBe("connection4.version", "4");
125 shouldBe("connection4.objectStoreNames.length", "3"); 126 shouldBe("connection4.objectStoreNames.length", "3");
126 shouldBe("connection4store1.indexNames.length", "3"); 127 shouldBe("connection4store1.indexNames.length", "3");
127 debug(""); 128 debug("");
128 129
129 finishJSTest(); 130 finishJSTest();
130 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698