| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 function setCompositionTest() { | 5 function setCompositionTest() { |
| 6 chrome.input.ime.setComposition({ | 6 chrome.input.ime.setComposition({ |
| 7 "contextID": 1, | 7 "contextID": 1, |
| 8 "text": "Pie", | 8 "text": "Pie", |
| 9 "selectionStart": 1, | 9 "selectionStart": 1, |
| 10 "selectionEnd": 2, | 10 "selectionEnd": 2, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 | 27 |
| 28 function commitTextTest() { | 28 function commitTextTest() { |
| 29 chrome.input.ime.commitText({ | 29 chrome.input.ime.commitText({ |
| 30 "contextID": 2, | 30 "contextID": 2, |
| 31 "text": "Seaguls" | 31 "text": "Seaguls" |
| 32 }, chrome.test.callbackPass()); | 32 }, chrome.test.callbackPass()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 | 35 |
| 36 function setCandidateWindowPropertiesTest() { | 36 // Disabled: crbug.com/641425. |
| 37 chrome.input.ime.setCandidateWindowProperties({ | 37 // function setCandidateWindowPropertiesTest() { |
| 38 "engineID": "test", | 38 // chrome.input.ime.setCandidateWindowProperties({ |
| 39 "properties": { | 39 // "engineID": "test", |
| 40 "visible": true, | 40 // "properties": { |
| 41 "cursorVisible": false, | 41 // "visible": true, |
| 42 "vertical": true, | 42 // "cursorVisible": false, |
| 43 "pageSize": 6, | 43 // "vertical": true, |
| 44 "auxiliaryText": "notes", | 44 // "pageSize": 6, |
| 45 "auxiliaryTextVisible": true | 45 // "auxiliaryText": "notes", |
| 46 } | 46 // "auxiliaryTextVisible": true |
| 47 }, chrome.test.callbackPass()); | 47 // } |
| 48 } | 48 // }, chrome.test.callbackPass()); |
| 49 // } |
| 49 | 50 |
| 50 | 51 |
| 51 function setCandidatesTest() { | 52 function setCandidatesTest() { |
| 52 chrome.input.ime.setCandidates({ | 53 chrome.input.ime.setCandidates({ |
| 53 "contextID": 8, | 54 "contextID": 8, |
| 54 "candidates": [{ | 55 "candidates": [{ |
| 55 "candidate": "one", | 56 "candidate": "one", |
| 56 "id": 1, | 57 "id": 1, |
| 57 "label": "first", | 58 "label": "first", |
| 58 "annotation": "The first one" | 59 "annotation": "The first one" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // "items": [{ | 107 // "items": [{ |
| 107 // "id": "Menu 1", | 108 // "id": "Menu 1", |
| 108 // "enabled": false | 109 // "enabled": false |
| 109 // }, { | 110 // }, { |
| 110 // "id": "Menu 2", | 111 // "id": "Menu 2", |
| 111 // "visible": false, | 112 // "visible": false, |
| 112 // }] | 113 // }] |
| 113 // }, chrome.test.callbackPass()); | 114 // }, chrome.test.callbackPass()); |
| 114 // } | 115 // } |
| 115 | 116 |
| 116 function deleteSurroundingText() { | 117 // Disabled: crbug.com/641425. |
| 117 chrome.input.ime.deleteSurroundingText({ | 118 // function deleteSurroundingText() { |
| 118 "engineID": "test", | 119 // chrome.input.ime.deleteSurroundingText({ |
| 119 "contextID": 1, | 120 // "engineID": "test", |
| 120 "offset": -1, | 121 // "contextID": 1, |
| 121 "length": 1 | 122 // "offset": -1, |
| 122 }, chrome.test.callbackPass()); | 123 // "length": 1 |
| 123 } | 124 // }, chrome.test.callbackPass()); |
| 125 // } |
| 124 | 126 |
| 125 chrome.test.runTests([setCompositionTest, clearCompositionTest, | 127 chrome.test.runTests([ |
| 126 commitTextTest, setCandidateWindowPropertiesTest, | 128 setCompositionTest, |
| 127 setCandidatesTest, setCursorPositionTest, | 129 clearCompositionTest, |
| 128 /*setMenuItemsTest, updateMenuItemsTest, */ | 130 commitTextTest, |
| 129 deleteSurroundingText]); | 131 // setCandidateWindowPropertiesTest, |
| 132 setCandidatesTest, |
| 133 setCursorPositionTest, |
| 134 // setMenuItemsTest, |
| 135 // updateMenuItemsTest, |
| 136 // deleteSurroundingText, |
| 137 ]); |
| OLD | NEW |