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

Unified Diff: components/offline_pages/offline_page_test_store.h

Issue 2497703002: [Offline pages] Resetting offline page metadata store to handle LOAD/INIT failures (Closed)
Patch Set: Fixing newly added test Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/offline_page_test_store.h
diff --git a/components/offline_pages/offline_page_test_store.h b/components/offline_pages/offline_page_test_store.h
index 7464bdd15e07d1e3077381cd13d131bf018c29cd..2304138ffd2bfaea009a9d466ec62b670b386770 100644
--- a/components/offline_pages/offline_page_test_store.h
+++ b/components/offline_pages/offline_page_test_store.h
@@ -26,7 +26,8 @@ class OfflinePageTestStore : public OfflinePageMetadataStore {
enum class TestScenario {
SUCCESSFUL,
WRITE_FAILED,
- LOAD_FAILED,
+ LOAD_FAILED_RESET_SUCCESS,
+ LOAD_FAILED_RESET_FAILED,
REMOVE_FAILED,
};
@@ -36,6 +37,7 @@ class OfflinePageTestStore : public OfflinePageMetadataStore {
~OfflinePageTestStore() override;
// OfflinePageMetadataStore overrides:
+ void Initialize(const InitializeCallback& callback) override;
void GetOfflinePages(const LoadCallback& callback) override;
void AddOfflinePage(const OfflinePageItem& offline_page,
const AddCallback& callback) override;
@@ -63,6 +65,7 @@ class OfflinePageTestStore : public OfflinePageMetadataStore {
OfflinePageItem last_saved_page_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
TestScenario scenario_;
+ StoreState store_state_;
std::map<int64_t, OfflinePageItem> offline_pages_;
« no previous file with comments | « components/offline_pages/offline_page_model_impl_unittest.cc ('k') | components/offline_pages/offline_page_test_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698