Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var kNewInputMethodTemplate = '_comp_ime_{EXT_ID}xkb:fr::fra'; | 5 var kNewInputMethodTemplate = '_comp_ime_{EXT_ID}xkb:fr::fra'; |
| 6 var kInitialInputMethodRegex = /_comp_ime_([a-z]{32})xkb:us::eng/; | 6 var kInitialInputMethodRegex = /_comp_ime_([a-z]{32})xkb:us::eng/; |
| 7 var kInvalidInputMethod = 'xx::xxx'; | 7 var kInvalidInputMethod = 'xx::xxx'; |
| 8 | 8 |
| 9 var testParams = { | 9 var testParams = { |
| 10 initialInputMethod: '', | 10 initialInputMethod: '', |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 chrome.test.assertTrue(removed.length === 0); | 185 chrome.test.assertTrue(removed.length === 0); |
| 186 chrome.test.assertEq(added[0], wordToAdd); | 186 chrome.test.assertEq(added[0], wordToAdd); |
| 187 chrome.test.succeed(); | 187 chrome.test.succeed(); |
| 188 }); | 188 }); |
| 189 }) | 189 }) |
| 190 .then(function() { | 190 .then(function() { |
| 191 return getAddPromise(wordToAdd); | 191 return getAddPromise(wordToAdd); |
| 192 }); | 192 }); |
| 193 } | 193 } |
| 194 | 194 |
| 195 function imeMenuConfigTest() { | |
| 196 chrome.inputMethodPrivate.getInputMethodConfig(function(config) { | |
| 197 chrome.test.assertTrue(config["isImeMenuActivated"]); | |
| 198 chrome.test.succeed(); | |
| 199 }); | |
|
stevenjb
2016/01/20 18:33:43
This tests the initial state, but not the event. S
Azure Wei
2016/01/21 10:25:07
imeMenuActivationChangedTest() is added to test th
| |
| 200 } | |
| 201 | |
| 195 chrome.test.sendMessage('ready'); | 202 chrome.test.sendMessage('ready'); |
| 196 chrome.test.runTests( | 203 chrome.test.runTests( |
| 197 [initTests, setTest, getTest, observeTest, setInvalidTest, getListTest, | 204 [initTests, setTest, getTest, observeTest, setInvalidTest, getListTest, |
| 198 loadDictionaryAsyncTest, fetchDictionaryTest, addWordToDictionaryTest, | 205 loadDictionaryAsyncTest, fetchDictionaryTest, addWordToDictionaryTest, |
| 199 dictionaryChangedTest]); | 206 ictionaryChangedTest, imeMenuConfigTest]); |
|
stevenjb
2016/01/20 18:33:43
'd' missing at beginning of line. (Did this succee
Azure Wei
2016/01/21 10:25:07
Sorry about the mistake.
| |
| OLD | NEW |