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

Unified Diff: chrome/browser/extensions/extension_service_test_base.h

Issue 1411773002: Move Sync-specific tests from ExtensionServiceTest into new file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@su_ext_reenable
Patch Set: move ExternalInstallPrompt override Created 5 years, 2 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/extension_service_test_base.h
diff --git a/chrome/browser/extensions/extension_service_test_base.h b/chrome/browser/extensions/extension_service_test_base.h
index 85b4d3c413b62801c1090b799500491014b97de3..0cb477860f1d30bdc8c6aa047de65518782bcd23 100644
--- a/chrome/browser/extensions/extension_service_test_base.h
+++ b/chrome/browser/extensions/extension_service_test_base.h
@@ -5,9 +5,12 @@
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_
+#include <string>
+
#include "base/at_exit.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -89,6 +92,20 @@ class ExtensionServiceTestBase : public testing::Test {
// Resets the browser thread bundle to one with |options|.
void ResetThreadBundle(int options);
+ // Helpers to check the existence and values of extension prefs.
+ size_t GetPrefKeyCount();
+ void ValidatePrefKeyCount(size_t count);
+ testing::AssertionResult ValidateBooleanPref(
+ const std::string& extension_id,
+ const std::string& pref_path,
+ bool expected_val);
+ void ValidateIntegerPref(const std::string& extension_id,
+ const std::string& pref_path,
+ int expected_val);
+ void ValidateStringPref(const std::string& extension_id,
+ const std::string& pref_path,
+ const std::string& expected_val);
+
// TODO(rdevlin.cronin): Pull out more methods from ExtensionServiceTest that
// are commonly used and/or reimplemented. For instance, methods to install
// extensions from various locations, etc.
@@ -148,6 +165,8 @@ class ExtensionServiceTestBase : public testing::Test {
chromeos::ScopedTestCrosSettings test_cros_settings_;
chromeos::ScopedTestUserManager test_user_manager_;
#endif
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestBase);
};
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_service_sync_unittest.cc ('k') | chrome/browser/extensions/extension_service_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698