diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-27 19:06:35 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-27 19:06:35 +0000 |
commit | 9e1abbc82e974719b757844402ec74aba660a3c8 (patch) | |
tree | 383f4cd93f6534ec1d55ba1d8a9dec2d46475372 /ppapi/tests | |
parent | f4821400355c5126dda788043ef6e148c067d160 (diff) | |
download | chromium_src-9e1abbc82e974719b757844402ec74aba660a3c8.zip chromium_src-9e1abbc82e974719b757844402ec74aba660a3c8.tar.gz chromium_src-9e1abbc82e974719b757844402ec74aba660a3c8.tar.bz2 |
Move PPB_KeyboardInputEvent.GetCode to stable.
Remove GetUsbKeycode and SetUsbKeyCode since they were earlier verisons of this API that are not being used anywhere.
Remove all the KeyboardEvent _Dev files since they will no longer be used once GetCode is moved out.
BUG=286359,284774,275049
R=binji@chromium.org, dcheng@chromium.org, dmichael@chromium.org
Review URL: https://codereview.chromium.org/112983005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r-- | ppapi/tests/test_ime_input_event.cc | 4 | ||||
-rw-r--r-- | ppapi/tests/test_input_event.cc | 15 | ||||
-rw-r--r-- | ppapi/tests/test_input_event.h | 2 | ||||
-rw-r--r-- | ppapi/tests/test_scrollbar.cc | 3 |
4 files changed, 14 insertions, 10 deletions
diff --git a/ppapi/tests/test_ime_input_event.cc b/ppapi/tests/test_ime_input_event.cc index fdb51c2..d4da130 100644 --- a/ppapi/tests/test_ime_input_event.cc +++ b/ppapi/tests/test_ime_input_event.cc @@ -194,7 +194,8 @@ pp::InputEvent TestImeInputEvent::CreateCharEvent(const std::string& text) { 100, // time_stamp 0, // modifiers 0, // keycode - pp::Var(text)); + pp::Var(text), + pp::Var()); } void TestImeInputEvent::GetFocusBySimulatingMouseClick() { @@ -421,4 +422,3 @@ std::string TestImeInputEvent::TestImeUnawareCancel() { ASSERT_TRUE(expected_events_.empty()); PASS(); } - diff --git a/ppapi/tests/test_input_event.cc b/ppapi/tests/test_input_event.cc index 34ad680..4fd0eda 100644 --- a/ppapi/tests/test_input_event.cc +++ b/ppapi/tests/test_input_event.cc @@ -17,6 +17,7 @@ namespace { const uint32_t kSpaceChar = 0x20; const char* kSpaceString = " "; +const char* kSpaceCode = "Space"; #define FINISHED_WAITING_MESSAGE "TEST_INPUT_EVENT_FINISHED_WAITING" @@ -140,14 +141,16 @@ pp::InputEvent TestInputEvent::CreateWheelEvent() { } pp::InputEvent TestInputEvent::CreateKeyEvent(PP_InputEvent_Type type, - uint32_t key_code) { + uint32_t key_code, + const std::string& code) { return pp::KeyboardInputEvent( instance_, type, 100, // time_stamp 0, // modifiers key_code, - pp::Var()); + pp::Var(), + pp::Var(code)); } pp::InputEvent TestInputEvent::CreateCharEvent(const std::string& text) { @@ -157,7 +160,8 @@ pp::InputEvent TestInputEvent::CreateCharEvent(const std::string& text) { 100, // time_stamp 0, // modifiers 0, // keycode - pp::Var(text)); + pp::Var(text), + pp::Var()); } pp::InputEvent TestInputEvent::CreateTouchEvent(PP_InputEvent_Type type, @@ -334,7 +338,7 @@ std::string TestInputEvent::TestEvents() { SimulateInputEvent(CreateWheelEvent())); ASSERT_TRUE( SimulateInputEvent(CreateKeyEvent(PP_INPUTEVENT_TYPE_KEYDOWN, - kSpaceChar))); + kSpaceChar, kSpaceCode))); ASSERT_TRUE( SimulateInputEvent(CreateCharEvent(kSpaceString))); ASSERT_TRUE(SimulateInputEvent(CreateTouchEvent(PP_INPUTEVENT_TYPE_TOUCHSTART, @@ -353,7 +357,7 @@ std::string TestInputEvent::TestEvents() { SimulateInputEvent(CreateWheelEvent())); ASSERT_FALSE( SimulateInputEvent(CreateKeyEvent(PP_INPUTEVENT_TYPE_KEYDOWN, - kSpaceChar))); + kSpaceChar, kSpaceCode))); ASSERT_FALSE( SimulateInputEvent(CreateCharEvent(kSpaceString))); @@ -417,4 +421,3 @@ std::string TestInputEvent::TestAcceptTouchEvent_4() { PP_INPUTEVENT_CLASS_TOUCH); PASS(); } - diff --git a/ppapi/tests/test_input_event.h b/ppapi/tests/test_input_event.h index 3b89368..88e7388 100644 --- a/ppapi/tests/test_input_event.h +++ b/ppapi/tests/test_input_event.h @@ -34,7 +34,7 @@ class TestInputEvent : public TestCase { PP_InputEvent_MouseButton buttons); pp::InputEvent CreateWheelEvent(); pp::InputEvent CreateKeyEvent(PP_InputEvent_Type type, - uint32_t key_code); + uint32_t key_code, const std::string& code); pp::InputEvent CreateCharEvent(const std::string& text); pp::InputEvent CreateTouchEvent(PP_InputEvent_Type type, const pp::FloatPoint& location); diff --git a/ppapi/tests/test_scrollbar.cc b/ppapi/tests/test_scrollbar.cc index 5bf3cf3..521ac17 100644 --- a/ppapi/tests/test_scrollbar.cc +++ b/ppapi/tests/test_scrollbar.cc @@ -43,7 +43,8 @@ std::string TestScrollbar::TestHandleEvent() { core->GetTimeTicks(), 0, // Modifier. 0x28, // Key code = VKEY_DOWN. - pp::Var()); + pp::Var(), + pp::Var("ArrowDown")); scrollbar_.HandleEvent(input_event); return scrollbar_value_changed_ ? |