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

Unified Diff: chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc

Issue 470893002: Update hotword private tests to not need auto whitelisting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With comment Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/hotword_private/experimentalHotwordEnabled/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
index 03f2251d9fcc16f490d9ff7873db499d784fc798..b77f09d492d673dd51a97bdede87c1509e88aa07 100644
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
@@ -14,9 +14,12 @@
#include "chrome/browser/search/hotword_service_factory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "extensions/common/switches.h"
namespace {
+const char kHotwordTestExtensionId[] = "cpfhkdbjfdgdebcjlifoldbijinjfifp";
+
class MockHotwordService : public HotwordService {
public:
explicit MockHotwordService(Profile* profile)
@@ -77,6 +80,15 @@ class HotwordPrivateApiTest : public ExtensionApiTest {
HotwordPrivateApiTest() {}
virtual ~HotwordPrivateApiTest() {}
+ virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE {
+ ExtensionApiTest::SetUpCommandLine(command_line);
+
+ // Whitelist the test extensions (which all share a common ID) to use
+ // private APIs.
+ command_line->AppendSwitchASCII(
+ extensions::switches::kWhitelistedExtensionID, kHotwordTestExtensionId);
+ }
+
virtual void SetUpOnMainThread() OVERRIDE {
ExtensionApiTest::SetUpOnMainThread();
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/hotword_private/experimentalHotwordEnabled/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698