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

Unified Diff: chrome/browser/extensions/component_loader_unittest.cc

Issue 687803004: [Hotword] Implement audio history pref accessing and setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing memory leak with scoped ptrs Created 6 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
« no previous file with comments | « no previous file | chrome/browser/history/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader_unittest.cc
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc
index a608afb72337b5b44bb366defd53d4f8ab0d1139..992c246d2955ebee3537bf9a65b838b477e11b7f 100644
--- a/chrome/browser/extensions/component_loader_unittest.cc
+++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -6,11 +6,13 @@
#include <string>
+#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/prefs/pref_registry_simple.h"
#include "chrome/browser/extensions/test_extension_service.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
@@ -220,6 +222,10 @@ TEST_F(ComponentLoaderTest, Remove) {
}
TEST_F(ComponentLoaderTest, LoadAll) {
+ // This loads the hotword component extension which has a dependency on sync.
+ // However, this doesn't work with unittests so disable sync.
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync);
+
extension_service_.set_ready(false);
// No extensions should be loaded if none were added.
@@ -240,6 +246,10 @@ TEST_F(ComponentLoaderTest, LoadAll) {
}
TEST_F(ComponentLoaderTest, AddOrReplace) {
+ // This loads the hotword component extension which has a dependency on sync.
+ // However, this doesn't work with unittests so disable sync.
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync);
+
EXPECT_EQ(0u, component_loader_.registered_extensions_count());
component_loader_.AddDefaultComponentExtensions(false);
size_t const default_count = component_loader_.registered_extensions_count();
« no previous file with comments | « no previous file | chrome/browser/history/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698