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

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

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. Created 9 years, 1 month 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_cursor_control.h ('k') | ppapi/tests/test_directory_reader.h » ('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) 2010 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_cursor_control.h" 5 #include "ppapi/tests/test_cursor_control.h"
6 6
7 #include "ppapi/c/dev/ppb_cursor_control_dev.h" 7 #include "ppapi/c/dev/ppb_cursor_control_dev.h"
8 #include "ppapi/cpp/module.h" 8 #include "ppapi/cpp/module.h"
9 #include "ppapi/tests/testing_instance.h" 9 #include "ppapi/tests/testing_instance.h"
10 10
11 REGISTER_TEST_CASE(CursorControl); 11 REGISTER_TEST_CASE(CursorControl);
12 12
13 TestCursorControl::TestCursorControl(TestingInstance* instance) 13 TestCursorControl::TestCursorControl(TestingInstance* instance)
14 : TestCase(instance), 14 : TestCase(instance),
15 cursor_control_interface_(NULL) { 15 cursor_control_interface_(NULL) {
16 } 16 }
17 17
18 bool TestCursorControl::Init() { 18 bool TestCursorControl::Init() {
19 cursor_control_interface_ = static_cast<PPB_CursorControl_Dev const*>( 19 cursor_control_interface_ = static_cast<PPB_CursorControl_Dev const*>(
20 pp::Module::Get()->GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE)); 20 pp::Module::Get()->GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE));
21 return !!cursor_control_interface_; 21 return !!cursor_control_interface_;
22 } 22 }
23 23
24 void TestCursorControl::RunTest() { 24 void TestCursorControl::RunTests(const std::string& filter) {
25 RUN_TEST(SetCursor); 25 RUN_TEST(SetCursor, filter);
26 } 26 }
27 27
28 std::string TestCursorControl::TestSetCursor() { 28 std::string TestCursorControl::TestSetCursor() {
29 // Very simplistic test to make sure we can actually call the function and 29 // Very simplistic test to make sure we can actually call the function and
30 // it reports success. This is a nice integration test to make sure the 30 // it reports success. This is a nice integration test to make sure the
31 // interface is hooked up. Obviously it's not easy in a plugin to test whether 31 // interface is hooked up. Obviously it's not easy in a plugin to test whether
32 // the mouse cursor actually changed. 32 // the mouse cursor actually changed.
33 ASSERT_TRUE(cursor_control_interface_->SetCursor(instance_->pp_instance(), 33 ASSERT_TRUE(cursor_control_interface_->SetCursor(instance_->pp_instance(),
34 PP_CURSORTYPE_WAIT, 0, NULL)); 34 PP_CURSORTYPE_WAIT, 0, NULL));
35 35
36 PASS(); 36 PASS();
37 } 37 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_cursor_control.h ('k') | ppapi/tests/test_directory_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698