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

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

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years 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_graphics_3d.cc ('k') | ppapi/tests/test_memory.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 PPB_WHEEL_INPUT_EVENT_INTERFACE)); 66 PPB_WHEEL_INPUT_EVENT_INTERFACE));
67 keyboard_input_event_interface_ = static_cast<const PPB_KeyboardInputEvent*>( 67 keyboard_input_event_interface_ = static_cast<const PPB_KeyboardInputEvent*>(
68 pp::Module::Get()->GetBrowserInterface( 68 pp::Module::Get()->GetBrowserInterface(
69 PPB_KEYBOARD_INPUT_EVENT_INTERFACE)); 69 PPB_KEYBOARD_INPUT_EVENT_INTERFACE));
70 70
71 bool success = 71 bool success =
72 input_event_interface_ && 72 input_event_interface_ &&
73 mouse_input_event_interface_ && 73 mouse_input_event_interface_ &&
74 wheel_input_event_interface_ && 74 wheel_input_event_interface_ &&
75 keyboard_input_event_interface_ && 75 keyboard_input_event_interface_ &&
76 InitTestingInterface(); 76 CheckTestingInterface();
77 77
78 // Set up a listener for our message that signals that all input events have 78 // Set up a listener for our message that signals that all input events have
79 // been received. 79 // been received.
80 std::string js_code; 80 std::string js_code;
81 // Note the following code is dependent on some features of test_case.html. 81 // Note the following code is dependent on some features of test_case.html.
82 // E.g., it is assumed that the DOM element where the plugin is embedded has 82 // E.g., it is assumed that the DOM element where the plugin is embedded has
83 // an id of 'plugin', and there is a function 'IsTestingMessage' that allows 83 // an id of 'plugin', and there is a function 'IsTestingMessage' that allows
84 // us to ignore the messages that are intended for use by the testing 84 // us to ignore the messages that are intended for use by the testing
85 // framework itself. 85 // framework itself.
86 js_code += "var plugin = document.getElementById('plugin');" 86 js_code += "var plugin = document.getElementById('plugin');"
(...skipping 191 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_graphics_3d.cc ('k') | ppapi/tests/test_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698