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

Side by Side Diff: ppapi/tests/test_input_event.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_flash_clipboard.cc ('k') | ppapi/tests/test_scrollbar.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ppapi/tests/test_input_event.h" 5 #include "ppapi/tests/test_input_event.h"
6 6
7 #include "ppapi/c/dev/ppb_testing_dev.h" 7 #include "ppapi/c/dev/ppb_testing_dev.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/ppb_input_event.h" 9 #include "ppapi/c/ppb_input_event.h"
10 #include "ppapi/cpp/input_event.h" 10 #include "ppapi/cpp/input_event.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 case PP_INPUTEVENT_TYPE_KEYDOWN: 205 case PP_INPUTEVENT_TYPE_KEYDOWN:
206 case PP_INPUTEVENT_TYPE_KEYUP: 206 case PP_INPUTEVENT_TYPE_KEYUP:
207 return 207 return
208 keyboard_input_event_interface_->GetKeyCode(received) == 208 keyboard_input_event_interface_->GetKeyCode(received) ==
209 keyboard_input_event_interface_->GetKeyCode(expected); 209 keyboard_input_event_interface_->GetKeyCode(expected);
210 210
211 case PP_INPUTEVENT_TYPE_CHAR: 211 case PP_INPUTEVENT_TYPE_CHAR:
212 return 212 return
213 keyboard_input_event_interface_->GetKeyCode(received) == 213 keyboard_input_event_interface_->GetKeyCode(received) ==
214 keyboard_input_event_interface_->GetKeyCode(expected) && 214 keyboard_input_event_interface_->GetKeyCode(expected) &&
215 pp::Var(pp::Var::PassRef(), 215 pp::Var(pp::PASS_REF,
216 keyboard_input_event_interface_->GetCharacterText(received)) == 216 keyboard_input_event_interface_->GetCharacterText(received)) ==
217 pp::Var(pp::Var::PassRef(), 217 pp::Var(pp::PASS_REF,
218 keyboard_input_event_interface_->GetCharacterText(expected)); 218 keyboard_input_event_interface_->GetCharacterText(expected));
219 219
220 default: 220 default:
221 break; 221 break;
222 } 222 }
223 223
224 return false; 224 return false;
225 } 225 }
226 226
227 bool TestInputEvent::HandleInputEvent(const pp::InputEvent& input_event) { 227 bool TestInputEvent::HandleInputEvent(const pp::InputEvent& input_event) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 SimulateInputEvent(CreateWheelEvent())); 278 SimulateInputEvent(CreateWheelEvent()));
279 ASSERT_FALSE( 279 ASSERT_FALSE(
280 SimulateInputEvent(CreateKeyEvent(PP_INPUTEVENT_TYPE_KEYDOWN, 280 SimulateInputEvent(CreateKeyEvent(PP_INPUTEVENT_TYPE_KEYDOWN,
281 kSpaceChar))); 281 kSpaceChar)));
282 ASSERT_FALSE( 282 ASSERT_FALSE(
283 SimulateInputEvent(CreateCharEvent(kSpaceString))); 283 SimulateInputEvent(CreateCharEvent(kSpaceString)));
284 284
285 PASS(); 285 PASS();
286 } 286 }
287 287
OLDNEW
« no previous file with comments | « ppapi/tests/test_flash_clipboard.cc ('k') | ppapi/tests/test_scrollbar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698