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

Unified Diff: chrome/browser/extensions/api/storage/settings_frontend_unittest.cc

Issue 184043031: Split up extensions storage API implementations for sync and local storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (split_sync) Created 6 years, 9 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: chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
diff --git a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
index c718e3106eb2784f9e0d6068e5a9639ae8e7fcc7..f26d40b652df11b41f6d20937663559fcb9ba1b4 100644
--- a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc
@@ -93,6 +93,17 @@ class ExtensionSettingsFrontendTest : public testing::Test {
// alternating in each test.
// TODO(kalman): explicitly test the two interact correctly.
+// Tests that the frontend is set up correctly.
+TEST_F(ExtensionSettingsFrontendTest, Basics) {
+ // Local storage is always enabled.
+ EXPECT_TRUE(frontend_->IsStorageEnabled(settings::LOCAL));
+ EXPECT_TRUE(frontend_->GetValueStoreCache(settings::LOCAL));
+
+ // Invalid storage areas are not available.
+ EXPECT_FALSE(frontend_->IsStorageEnabled(settings::INVALID));
+ EXPECT_FALSE(frontend_->GetValueStoreCache(settings::INVALID));
+}
+
TEST_F(ExtensionSettingsFrontendTest, SettingsPreservedAcrossReconstruction) {
const std::string id = "ext";
scoped_refptr<const Extension> extension =

Powered by Google App Engine
This is Rietveld 408576698