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

Side by Side Diff: chrome/test/data/extensions/api_test/input_ime/background.js

Issue 2285573002: [Extensions] Convert some SyncExtensionFunctions (Closed)
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 73
74 function setCursorPositionTest() { 74 function setCursorPositionTest() {
75 chrome.input.ime.setCursorPosition({ 75 chrome.input.ime.setCursorPosition({
76 "contextID": 9, 76 "contextID": 9,
77 "candidateID": 1 77 "candidateID": 1
78 }, chrome.test.callbackPass()); 78 }, chrome.test.callbackPass());
79 } 79 }
80 80
81 81
82 // Disabled: crbug.com/641425.
lazyboy 2016/08/29 18:01:49 Add this change to CL description? These don't wo
Devlin 2016/08/29 20:29:54 Adjusted cl description. These actually don't wor
83 // function setMenuItemsTest() {
84 // chrome.input.ime.setMenuItems({
85 // "engineID": "test",
86 // "items": [{
87 // "id": "Menu 1",
88 // "label": "Menu 1",
89 // "style": "check",
90 // "visible": true,
91 // "enabled": true
92 // }, {
93 // "id": "Menu 2",
94 // "label": "Menu 2",
95 // "style": "radio",
96 // "visible": true,
97 // "enabled": true
98 // }]
99 // }, chrome.test.callbackPass());
100 // }
82 101
83 function setMenuItemsTest() { 102 // Disabled: crbug.com/641425.
84 chrome.input.ime.setMenuItems({ 103 // function updateMenuItemsTest() {
85 "engineID": "test", 104 // chrome.input.ime.updateMenuItems({
86 "items": [{ 105 // "engineID": "test",
87 "id": "Menu 1", 106 // "items": [{
88 "label": "Menu 1", 107 // "id": "Menu 1",
89 "style": "check", 108 // "enabled": false
90 "visible": true, 109 // }, {
91 "enabled": true 110 // "id": "Menu 2",
92 }, { 111 // "visible": false,
93 "id": "Menu 2", 112 // }]
94 "label": "Menu 2", 113 // }, chrome.test.callbackPass());
95 "style": "radio", 114 // }
96 "visible": true,
97 "enabled": true
98 }]
99 }, chrome.test.callbackPass());
100 }
101
102 function updateMenuItemsTest() {
103 chrome.input.ime.updateMenuItems({
104 "engineID": "test",
105 "items": [{
106 "id": "Menu 1",
107 "enabled": false
108 }, {
109 "id": "Menu 2",
110 "visible": false,
111 }]
112 }, chrome.test.callbackPass());
113 }
114 115
115 function deleteSurroundingText() { 116 function deleteSurroundingText() {
116 chrome.input.ime.deleteSurroundingText({ 117 chrome.input.ime.deleteSurroundingText({
117 "engineID": "test", 118 "engineID": "test",
118 "contextID": 1, 119 "contextID": 1,
119 "offset": -1, 120 "offset": -1,
120 "length": 1 121 "length": 1
121 }, chrome.test.callbackPass()); 122 }, chrome.test.callbackPass());
122 } 123 }
123 124
124 chrome.test.runTests([setCompositionTest, clearCompositionTest, 125 chrome.test.runTests([setCompositionTest, clearCompositionTest,
125 commitTextTest, setCandidateWindowPropertiesTest, 126 commitTextTest, setCandidateWindowPropertiesTest,
126 setCandidatesTest, setCursorPositionTest, 127 setCandidatesTest, setCursorPositionTest,
127 setMenuItemsTest, updateMenuItemsTest, 128 /*setMenuItemsTest, updateMenuItemsTest, */
128 deleteSurroundingText]); 129 deleteSurroundingText]);
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698