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

Side by Side Diff: content/test/data/indexeddb/value_size_test.js

Issue 11415083: Remove references to IDBDatabaseException and IDBRequest.errorCode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix error propagation from workers in endure test Created 8 years, 1 month 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
« no previous file with comments | « content/test/data/indexeddb/object_store_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function test() 5 function test()
6 { 6 {
7 indexedDBTest(prepareDatabase, function() { 7 indexedDBTest(prepareDatabase, function() {
8 setTimeout(testUnderLimit, 0); 8 setTimeout(testUnderLimit, 0);
9 }); 9 });
10 } 10 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 var store = transaction.objectStore("store"); 90 var store = transaction.objectStore("store");
91 var request; 91 var request;
92 try { 92 try {
93 debug("store.add overLimit"); 93 debug("store.add overLimit");
94 request = store.add(overLimit, key++); 94 request = store.add(overLimit, key++);
95 request.onsuccess = unexpectedSuccessCallback; 95 request.onsuccess = unexpectedSuccessCallback;
96 fail('store.add - Expected exception, but none was raised'); 96 fail('store.add - Expected exception, but none was raised');
97 } catch (e) { 97 } catch (e) {
98 debug('Exception (expected)'); 98 debug('Exception (expected)');
99 ex = e; 99 ex = e;
100 shouldBe("ex.code", "IDBDatabaseException.DATA_ERR"); 100 // TODO(jsbell): Uncomment when wkbug.com/102514 has landed/rolled.
101 //shouldBe("ex.code", "0");
101 shouldBe("ex.name", "'DataError'"); 102 shouldBe("ex.name", "'DataError'");
102 } 103 }
103 104
104 try { 105 try {
105 debug("store.put overLimit"); 106 debug("store.put overLimit");
106 request = store.put(overLimit, key++); 107 request = store.put(overLimit, key++);
107 request.onsuccess = unexpectedSuccessCallback; 108 request.onsuccess = unexpectedSuccessCallback;
108 fail('store.add - Expected exception, but none was raised'); 109 fail('store.add - Expected exception, but none was raised');
109 } catch (e) { 110 } catch (e) {
110 debug('Exception (expected)'); 111 debug('Exception (expected)');
111 ex = e; 112 ex = e;
112 shouldBe("ex.code", "IDBDatabaseException.DATA_ERR"); 113 // TODO(jsbell): Uncomment when wkbug.com/102514 has landed/rolled.
114 //shouldBe("ex.code", "0");
113 shouldBe("ex.name", "'DataError'"); 115 shouldBe("ex.name", "'DataError'");
114 } 116 }
115 117
116 request = store.openCursor(); 118 request = store.openCursor();
117 request.onerror = unexpectedErrorCallback; 119 request.onerror = unexpectedErrorCallback;
118 request.onsuccess = function () { 120 request.onsuccess = function () {
119 var cursor = request.result; 121 var cursor = request.result;
120 try { 122 try {
121 debug("cursor.update overLimit"); 123 debug("cursor.update overLimit");
122 request = cursor.update(overLimit); 124 request = cursor.update(overLimit);
123 request.onerror = unexpectedSuccessCallback; 125 request.onerror = unexpectedSuccessCallback;
124 fail('cursor.update - Expected exception, but none was raised'); 126 fail('cursor.update - Expected exception, but none was raised');
125 } catch (e) { 127 } catch (e) {
126 debug('Exception (expected)'); 128 debug('Exception (expected)');
127 ex = e; 129 ex = e;
128 shouldBe("ex.code", "IDBDatabaseException.DATA_ERR"); 130 // TODO(jsbell): Uncomment when wkbug.com/102514 has landed/rolled.
131 //shouldBe("ex.code", "0");
129 shouldBe("ex.name", "'DataError'"); 132 shouldBe("ex.name", "'DataError'");
130 133
131 transaction.abort(); 134 transaction.abort();
132 } 135 }
133 }; 136 };
134 137
135 transaction.oncomplete = unexpectedCompleteCallback; 138 transaction.oncomplete = unexpectedCompleteCallback;
136 transaction.onabort = function() { done(); }; 139 transaction.onabort = function() { done(); };
137 } 140 }
138 } 141 }
OLDNEW
« no previous file with comments | « content/test/data/indexeddb/object_store_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698