summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-21 07:50:36 +0000
committerbryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-21 07:50:36 +0000
commitb42f8d9072bbabbcb5d04042fe4334f1fd4bff6a (patch)
tree34d99d9000d347cc54b263ad39a03e1f470ae19a /chrome/test
parente45a2307a2d8caaba731ae6b02808c379bc459fa (diff)
downloadchromium_src-b42f8d9072bbabbcb5d04042fe4334f1fd4bff6a.zip
chromium_src-b42f8d9072bbabbcb5d04042fe4334f1fd4bff6a.tar.gz
chromium_src-b42f8d9072bbabbcb5d04042fe4334f1fd4bff6a.tar.bz2
Insert text directly from the virtual keyboard.
This allows the insertion of text that does not directly correspond to key codes. The new API introduced is a temporary solution to allow us to continue prototyping the virtual keyboard and understanding how the implementation will interact with IMEs until proper IME integration can be achieved. BUG=237533 Review URL: https://chromiumcodereview.appspot.com/16972006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/input/manifest.json10
-rw-r--r--chrome/test/data/extensions/api_test/input/test.js116
2 files changed, 0 insertions, 126 deletions
diff --git a/chrome/test/data/extensions/api_test/input/manifest.json b/chrome/test/data/extensions/api_test/input/manifest.json
deleted file mode 100644
index 93d0ce8f..0000000
--- a/chrome/test/data/extensions/api_test/input/manifest.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "chrome.experimental.input.virtualKeyboard",
- "version": "0.1",
- "manifest_version": 2,
- "description": "end-to-end browser test for chrome.experimental.input.virtualKeyboard API",
- "background": {
- "scripts": ["test.js"]
- },
- "permissions": ["experimental"]
-}
diff --git a/chrome/test/data/extensions/api_test/input/test.js b/chrome/test/data/extensions/api_test/input/test.js
deleted file mode 100644
index 31611cd..0000000
--- a/chrome/test/data/extensions/api_test/input/test.js
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// experimental.input.virtualKeyboard API test for Chrome
-// browser_tests --gtest_filter=ExtensionApiTest.Input
-
-chrome.test.runTests([
- function sendKeyboardEvent() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'A' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (chrome.runtime.lastError) {
- // this is expected for now: no one is handling keys yet
- // chrome.test.fail();
- }
- // when the browser is listening to events, we should check that
- // this event was delivered as we expected. For now, just succeed.
- chrome.test.succeed();
- });
- },
-
- function badKeyIdentifier() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'BogusId' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function badEventType() {
- var e = { 'type': 'BAD', 'keyIdentifier': 'A' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function unmappedKeyIdentifier() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'Again' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventUnicode1() {
- // U+00E1: LATIN SMALL LATTER A WITH ACUTE.
- var e = { 'type': 'keydown', 'keyIdentifier': 'U+00E1' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (chrome.runtime.lastError) {
- // this is expected for now. See sendKeyboardEvent().
- // chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventUnicode2() {
- // U+043A: CYRILLIC SMALL LETTER KA
- var e = { 'type': 'keydown',
- 'keyIdentifier': 'U+043a' }; // lower case is also ok.
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (chrome.runtime.lastError) {
- // this is expected for now. See sendKeyboardEvent().
- // chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventBadUnicode1() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'U+' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventBadUnicode2() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'U+1' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventBadUnicode3() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'U+111g' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-
- function sendKeyboardEventBadUnicode4() {
- var e = { 'type': 'keydown', 'keyIdentifier': 'U+11111' };
- chrome.experimental.input.virtualKeyboard.sendKeyboardEvent(e, function() {
- if (!chrome.runtime.lastError) {
- chrome.test.fail();
- }
- chrome.test.succeed();
- });
- },
-]);