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

Unified Diff: chrome/test/data/extensions/api_test/input_method/background.js

Issue 1552743003: Add chrome.inputMethodPrivate.onImeMenuActivationChanged API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/test/data/extensions/api_test/input_method/background.js
diff --git a/chrome/test/data/extensions/api_test/input_method/background.js b/chrome/test/data/extensions/api_test/input_method/background.js
index ccfc67e14f687515b88846cbc9acbf1c35a67abe..e8dfc7f6c122b94541183e7fdd42e6ff8329532d 100644
--- a/chrome/test/data/extensions/api_test/input_method/background.js
+++ b/chrome/test/data/extensions/api_test/input_method/background.js
@@ -192,8 +192,26 @@ function dictionaryChangedTest() {
});
}
+function imeMenuConfigTest() {
+ chrome.inputMethodPrivate.getInputMethodConfig(function(config) {
+ chrome.test.assertTrue(config["isImeMenuActivated"]);
+ chrome.test.succeed();
+ });
+}
+
+function imeMenuActivationChangedTest() {
Devlin 2016/01/21 19:36:02 Thinking about this more, let's have this one be a
Azure Wei 2016/01/23 02:40:39 Done. The imeMenuConfigTest() and imeMenuActivatio
+ chrome.inputMethodPrivate.onImeMenuActivationChanged.addListener(
+ function(activation) {
Devlin 2016/01/21 19:30:25 nit: as elsewhere, prefer a variable name of "isAc
Azure Wei 2016/01/23 02:40:39 Done.
+ chrome.test.assertTrue(!activation);
Devlin 2016/01/21 19:30:25 prefer assertFalse
Azure Wei 2016/01/23 02:40:39 Done.
+ chrome.test.sendMessage('ime_menu_ready');
+ chrome.test.succeed();
stevenjb 2016/01/21 19:16:16 Remove this extra test.succeed() call and add a co
Azure Wei 2016/01/23 02:40:39 Done.
+ });
+ // We just add the listener without receiving any event at first.
Devlin 2016/01/21 19:30:25 Add that the test is continued in the C++; otherwi
Azure Wei 2016/01/23 02:40:39 Done.
+ chrome.test.succeed();
+}
+
chrome.test.sendMessage('ready');
chrome.test.runTests(
[initTests, setTest, getTest, observeTest, setInvalidTest, getListTest,
loadDictionaryAsyncTest, fetchDictionaryTest, addWordToDictionaryTest,
- dictionaryChangedTest]);
+ dictionaryChangedTest, imeMenuConfigTest, imeMenuActivationChangedTest]);

Powered by Google App Engine
This is Rietveld 408576698