OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 function imeMenuConfigTest() { | |
6 chrome.inputMethodPrivate.getInputMethodConfig(function(config) { | |
7 chrome.test.assertTrue(config["isImeMenuActivated"]); | |
8 chrome.test.succeed(); | |
9 }); | |
10 } | |
11 | |
12 function imeMenuActivationChangedTest() { | |
13 chrome.inputMethodPrivate.onImeMenuActivationChanged.addListener( | |
14 function(isActive) { | |
15 chrome.test.assertFalse(isActive); | |
16 // Wait for the 'event_ready' message in | |
17 // ExtensionInputMethodApiTest.ImeMenuActivation. | |
18 chrome.test.sendMessage('event_ready'); | |
19 }); | |
20 // We just add the listener without receiving any event at first time. | |
21 // The test continues in input_method_apitest_chromeos.cc to trigger | |
22 // the event, and succeeds after getting the 'event_ready' message. | |
23 chrome.test.succeed(); | |
24 } | |
25 | |
26 chrome.test.sendMessage('config_ready'); | |
27 chrome.test.runTests( | |
Devlin
2016/01/25 20:35:36
This style of test would be more suited to just th
Azure Wei
2016/01/27 05:06:26
Done.
| |
28 [imeMenuConfigTest, imeMenuActivationChangedTest]); | |
OLD | NEW |