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

Unified Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 237143006: Make iterating over a corrupted IndexedDB fail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Status checks. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_browsertest.cc
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 6e8b40a459144c88cd4feddfaf0050594325902d..206020fe77b349afb8479df487025fd52e089e33 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -473,7 +473,7 @@ static scoped_ptr<net::test_server::HttpResponse> CorruptDBRequestHandler(
} // namespace
-IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CorruptedOpenDatabase) {
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CorruptedOpenDatabaseGet) {
ASSERT_TRUE(embedded_test_server()->Started() ||
embedded_test_server()->InitializeAndWaitUntilReady());
const GURL& origin_url = embedded_test_server()->base_url();
@@ -484,7 +484,25 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CorruptedOpenDatabase) {
s_corrupt_db_test_prefix));
std::string test_file =
- s_corrupt_db_test_prefix + "corrupted_open_db_detection.html";
+ s_corrupt_db_test_prefix + "corrupted_open_db_detection.html#get";
+ SimpleTest(embedded_test_server()->GetURL(test_file));
+
+ test_file = s_corrupt_db_test_prefix + "corrupted_open_db_recovery.html";
+ SimpleTest(embedded_test_server()->GetURL(test_file));
+}
+
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CorruptedOpenDatabaseIterate) {
+ ASSERT_TRUE(embedded_test_server()->Started() ||
+ embedded_test_server()->InitializeAndWaitUntilReady());
+ const GURL& origin_url = embedded_test_server()->base_url();
+ embedded_test_server()->RegisterRequestHandler(
+ base::Bind(&CorruptDBRequestHandler,
+ base::ConstRef(GetContext()),
+ origin_url,
+ s_corrupt_db_test_prefix));
+
+ std::string test_file =
+ s_corrupt_db_test_prefix + "corrupted_open_db_detection.html#iterate";
SimpleTest(embedded_test_server()->GetURL(test_file));
test_file = s_corrupt_db_test_prefix + "corrupted_open_db_recovery.html";

Powered by Google App Engine
This is Rietveld 408576698