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

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

Issue 559303002: Hotword Audio Verification app: control the hotword settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launch-state
Patch Set: Created 6 years, 3 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/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 6917f59f1f48f643da8da83c9f4b4781a6ac3b50..45a3c32852080b4cfaaf37979b3349b38e95b7ab 100644
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
@@ -156,6 +156,25 @@ IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, SetAudioLoggingEnabled) {
EXPECT_FALSE(service()->IsOptedIntoAudioLogging());
}
+IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, SetHotwordAlwaysOnSearchEnabled) {
+ EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(
+ prefs::kHotwordAlwaysOnSearchEnabled));
+
+ ExtensionTestMessageListener listenerTrue("ready", false);
rpetterson 2014/09/11 20:14:17 Do you mean true here instead of false?
kcarattini 2014/09/12 01:02:07 I don't think I need to wait for a reply here beca
benwells 2014/09/12 02:58:13 This is correct. The boolean argument is to say wh
rpetterson 2014/09/12 03:03:32 Got it. Thanks for the clarification!
kcarattini 2014/09/12 05:17:56 Done.
+ ASSERT_TRUE(RunComponentExtensionTest("setHotwordAlwaysOnSearchEnableTrue"))
+ << message_;
+ EXPECT_TRUE(listenerTrue.WaitUntilSatisfied());
+ EXPECT_TRUE(profile()->GetPrefs()->GetBoolean(
+ prefs::kHotwordAlwaysOnSearchEnabled));
+
+ ExtensionTestMessageListener listenerFalse("ready", false);
+ ASSERT_TRUE(RunComponentExtensionTest("setHotwordAlwaysOnSearchEnableFalse"))
+ << message_;
+ EXPECT_TRUE(listenerFalse.WaitUntilSatisfied());
+ EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(
+ prefs::kHotwordAlwaysOnSearchEnabled));
+}
+
IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, GetStatus) {
ASSERT_TRUE(RunComponentExtensionTest("getEnabled")) << message_;
}

Powered by Google App Engine
This is Rietveld 408576698