| 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 b77f09d492d673dd51a97bdede87c1509e88aa07..0cf395a36fe554501cd43e0c95502ce2588f7631 100644
|
| --- a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
|
| +++ b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc
|
| @@ -165,6 +165,25 @@ IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, IsAvailableFalse) {
|
| EXPECT_TRUE(listener.WaitUntilSatisfied());
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, AlwaysOnEnabled) {
|
| + {
|
| + ExtensionTestMessageListener listener("alwaysOnEnabled: false",
|
| + false);
|
| + ASSERT_TRUE(RunComponentExtensionTest("alwaysOnEnabled"))
|
| + << message_;
|
| + EXPECT_TRUE(listener.WaitUntilSatisfied());
|
| + }
|
| +
|
| + profile()->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled, true);
|
| + {
|
| + ExtensionTestMessageListener listener("alwaysOnEnabled: true",
|
| + false);
|
| + ASSERT_TRUE(RunComponentExtensionTest("alwaysOnEnabled"))
|
| + << message_;
|
| + EXPECT_TRUE(listener.WaitUntilSatisfied());
|
| + }
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, ExperimentalHotwordEnabled) {
|
| // Disabled by default.
|
| ExtensionTestMessageListener listener("experimentalHotwordEnabled: false",
|
| @@ -196,6 +215,11 @@ IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, OnEnabledChanged) {
|
| ExtensionTestMessageListener listenerNotification("notification", false);
|
| profile()->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, true);
|
| EXPECT_TRUE(listenerNotification.WaitUntilSatisfied());
|
| +
|
| + listenerNotification.Reset();
|
| + profile()->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
|
| + true);
|
| + EXPECT_TRUE(listenerNotification.WaitUntilSatisfied());
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(HotwordPrivateApiTest, HotwordSession) {
|
|
|