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

Side by Side Diff: content/test/data/indexeddb/corrupted_open_db_detection.html

Issue 1116253003: IndexedDB: Added IDBObjectStore.getAll() corruption test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@idb-objectstore-getall
Patch Set: Created 5 years, 7 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <!-- 3 <!--
4 Copyright 2014 The Chromium Authors. All rights reserved. 4 Copyright 2014 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be 5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file. 6 found in the LICENSE file.
7 --> 7 -->
8 <head> 8 <head>
9 <title>IDB test that db's corrupted while open are properly handled Part 1 / 2</ title> 9 <title>IDB test that db's corrupted while open are properly handled Part 1 / 2</ title>
10 <script type="text/javascript" src="common.js"></script> 10 <script type="text/javascript" src="common.js"></script>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 }, 111 },
112 get: function() { 112 get: function() {
113 testXhr("/corrupt/test/fail?class=LevelDBTransaction&method=Get&instNum=1", 113 testXhr("/corrupt/test/fail?class=LevelDBTransaction&method=Get&instNum=1",
114 function() { 114 function() {
115 tests.testCommon('readonly'); 115 tests.testCommon('readonly');
116 request = objectStore.get('key-0'); 116 request = objectStore.get('key-0');
117 request.onsuccess = unexpectedSuccessCallback; 117 request.onsuccess = unexpectedSuccessCallback;
118 request.onerror = requestError; 118 request.onerror = requestError;
119 }); 119 });
120 }, 120 },
121 getAll: function() {
122 testXhr("/corrupt/test/fail?class=LevelDBTransaction&method=Get&instNum=1",
123 function() {
124 tests.testCommon('readonly');
125 request = objectStore.getAll('key-0');
126 request.onsuccess = unexpectedSuccessCallback;
127 request.onerror = requestError;
128 });
129 },
121 failTransactionCommit: function() { 130 failTransactionCommit: function() {
122 tests.testCommon('readwrite'); 131 tests.testCommon('readwrite');
123 db.onclose = function(event) { 132 db.onclose = function(event) {
124 shouldBe("numTransactionErrors", "0"); 133 shouldBe("numTransactionErrors", "0");
125 shouldBe("numTransactionAborts", "1"); 134 shouldBe("numTransactionAborts", "1");
126 135
127 done("Closed as expected"); 136 done("Closed as expected");
128 }; 137 };
129 testXhr("/corrupt/test/fail?class=LevelDBTransaction&method=Commit", functio n() { 138 testXhr("/corrupt/test/fail?class=LevelDBTransaction&method=Commit", functio n() {
130 request = objectStore.put("Any Value", 'key-0'); 139 request = objectStore.put("Any Value", 'key-0');
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 else 207 else
199 fail('Unknown test: "' + testType + '"'); 208 fail('Unknown test: "' + testType + '"');
200 } 209 }
201 210
202 </script> 211 </script>
203 </head> 212 </head>
204 <body onLoad="test()"> 213 <body onLoad="test()">
205 <div id="status">Starting...</div> 214 <div id="status">Starting...</div>
206 </body> 215 </body>
207 </html> 216 </html>
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698