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

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: . 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..78a0dd2893955c0469457fa7e047a8dcbf4e2dab 100644
--- a/chrome/browser/extensions/extension_service_test_base.h
+++ b/chrome/browser/extensions/extension_service_test_base.h
@@ -5,6 +5,8 @@
#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"
@@ -89,6 +91,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.

Powered by Google App Engine
This is Rietveld 408576698