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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/transaction-complete-workers.js

Issue 607513002: Onerror return value handling in workers fixed as per HTML5 spec. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added new layout tests and rebaselined two of them. Created 6 years, 2 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
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 workers, recursion, and transaction termination."); 6 description("Test IndexedDB workers, recursion, and transaction termination.");
7 7
8 indexedDBTest(prepareDatabase, createTransaction); 8 indexedDBTest(prepareDatabase, createTransaction);
9 function prepareDatabase(evt) 9 function prepareDatabase(evt)
10 { 10 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 debug(""); 98 debug("");
99 debug("errorHandler():"); 99 debug("errorHandler():");
100 // FIXME: Should be able to stop the error here, but it isn't an Event objec t. 100 // FIXME: Should be able to stop the error here, but it isn't an Event objec t.
101 // evalAndLog("event.preventDefault()"); 101 // evalAndLog("event.preventDefault()");
102 evalAndLog("self.onerror = self.old_onerror"); 102 evalAndLog("self.onerror = self.old_onerror");
103 evalAndLog("transaction = db.transaction('store')"); 103 evalAndLog("transaction = db.transaction('store')");
104 evalAndLog("store = transaction.objectStore('store')"); 104 evalAndLog("store = transaction.objectStore('store')");
105 transaction.onerror = unexpectedErrorCallback; 105 transaction.onerror = unexpectedErrorCallback;
106 transaction.onabort = unexpectedAbortCallback; 106 transaction.onabort = unexpectedAbortCallback;
107 transaction.oncomplete = errorTransactionCompleted; 107 transaction.oncomplete = errorTransactionCompleted;
108 // We will cancel the error event here itself,
109 // this will allow the transaction to complete.
110 // Thus the event.preventDefault in the worker.onerror
111 // is no longer required in this scenario.
112 return true;
108 } 113 }
109 114
110 function errorTransactionCompleted() 115 function errorTransactionCompleted()
111 { 116 {
112 testPassed("Transaction completed"); 117 testPassed("Transaction completed");
113 evalAndExpectException("store.get(0)", "0", "'TransactionInactiveError'"); 118 evalAndExpectException("store.get(0)", "0", "'TransactionInactiveError'");
114 finishJSTest(); 119 finishJSTest();
115 } 120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698