Index: chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js |
diff --git a/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js b/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js |
index d007bc68105ba5945bff9f498e52549d44355007..47ec407f09363b54ccd32b10546881f8aa635715 100644 |
--- a/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js |
+++ b/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js |
@@ -55,6 +55,7 @@ chrome.test.runTests([ |
}, |
function testSendKeyEvents() { |
+ // Sends a normal character key. |
chrome.input.ime.sendKeyEvents({ |
'contextID': 1, |
'keyData': [{ |
@@ -68,6 +69,41 @@ chrome.test.runTests([ |
'key': 'a', |
'code': 'KeyA' |
}] |
+ }, function() { |
+ if (chrome.runtime.lastError) {} |
Devlin
2016/06/22 16:33:12
Can we not tell whether or not we expect these to
Azure Wei
2016/06/23 02:45:23
Done.
|
+ }); |
+ |
+ // Sends Ctrl+A that should fail on special pages. |
+ chrome.input.ime.sendKeyEvents({ |
+ 'contextID': 1, |
+ 'keyData': [{ |
+ 'type': 'keydown', |
+ 'requestId': '2', |
+ 'key': 'a', |
+ 'code': 'KeyA', |
+ 'ctrlKey': true |
+ }, { |
+ 'type': 'keyup', |
+ 'requestId': '3', |
+ 'key': 'a', |
+ 'code': 'KeyA', |
+ 'ctrlKey': true |
+ }] |
+ }, function() { |
+ if (chrome.runtime.lastError) {} |
+ }); |
+ |
+ // Sends Tab key that should fail on special pages. |
+ chrome.input.ime.sendKeyEvents({ |
+ 'contextID': 1, |
+ 'keyData': [{ |
+ 'type': 'keydown', |
+ 'requestId': '4', |
+ 'key': '\u0009', |
+ 'code': 'Tab' |
+ }] |
+ }, function() { |
+ if (chrome.runtime.lastError) {} |
}); |
chrome.test.succeed(); |
} |