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

Unified Diff: chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc

Issue 1552743003: Add chrome.inputMethodPrivate.onImeMenuActivationChanged API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with master Created 4 years, 11 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/chromeos/extensions/input_method_apitest_chromeos.cc
diff --git a/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc b/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc
index 3256836bee59c9129bfafd1131879fe52dbff85a..7f818c23dd33eb1be35beda33ffe06039574cbf2 100644
--- a/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc
+++ b/chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc
@@ -8,9 +8,12 @@
#include "base/command_line.h"
#include "base/memory/ref_counted.h"
+#include "base/prefs/pref_service.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/chromeos/extensions/input_method_event_router.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
+#include "chrome/common/pref_names.h"
+#include "chromeos/chromeos_switches.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
@@ -69,6 +72,7 @@ class ExtensionInputMethodApiTest : public ExtensionApiTest {
command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID,
"ilanclmaeigfpnmdlgelmhkpkegdioip");
+ command_line->AppendSwitch(chromeos::switches::kEnableImeMenu);
}
};
@@ -78,5 +82,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInputMethodApiTest, Basic) {
// Listener for extension's background ready.
TestListener listener;
+ browser()->profile()->GetPrefs()->SetBoolean(prefs::kLangugaeImeMenuActivated,
+ true);
ASSERT_TRUE(RunExtensionTest("input_method")) << message_;
}

Powered by Google App Engine
This is Rietveld 408576698