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

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: Rebase 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 cd2cbe4663fadc942fff04a1f0329d247e7dcecd..6f4dc49dc12b39788fad4fc0c85dec289cc3a5ea 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 listener("ready", false);
+ ASSERT_TRUE(RunComponentExtensionTest("setHotwordAlwaysOnSearchEnableTrue"))
+ << message_;
+ EXPECT_TRUE(listener.WaitUntilSatisfied());
+ EXPECT_TRUE(profile()->GetPrefs()->GetBoolean(
+ prefs::kHotwordAlwaysOnSearchEnabled));
+
+ listener.Reset();
+ ASSERT_TRUE(RunComponentExtensionTest("setHotwordAlwaysOnSearchEnableFalse"))
+ << message_;
+ EXPECT_TRUE(listener.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