Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/input_method/ime_menu/background.js |
| diff --git a/chrome/test/data/extensions/api_test/input_method/ime_menu/background.js b/chrome/test/data/extensions/api_test/input_method/ime_menu/background.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e9e098e32d63aad70a8bd1ac04e4c4311cae1011 |
| --- /dev/null |
| +++ b/chrome/test/data/extensions/api_test/input_method/ime_menu/background.js |
| @@ -0,0 +1,21 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +chrome.inputMethodPrivate.getInputMethodConfig(function(config) { |
| + chrome.test.assertTrue(config["isImeMenuActivated"]); |
| + chrome.test.sendMessage('config_ready'); |
| +}); |
| + |
| +// We just add the listener without receiving any event at first time. The test |
| +// continues in input_method_apitest_chromeos.cc to trigger the event, and |
| +// succeeds after getting the 'event_ready' message. |
| +chrome.inputMethodPrivate.onImeMenuActivationChanged.addListener( |
| + function(isActive) { |
| + chrome.test.assertFalse(isActive); |
| + // Wait for the 'event_ready' message in |
| + // ExtensionInputMethodApiTest.ImeMenuActivation. |
| + chrome.test.sendMessage('event_ready'); |
| +}); |
| + |
| +chrome.test.notifyPass(); |
|
Devlin
2016/01/27 20:33:27
We shouldn't need this.
Azure Wei
2016/01/28 12:24:58
Deleted.
|