OLD | NEW |
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_flash.h" | 5 #include "ppapi/tests/test_flash.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | |
8 #include "ppapi/c/private/ppb_flash.h" | 7 #include "ppapi/c/private/ppb_flash.h" |
9 #include "ppapi/cpp/instance.h" | 8 #include "ppapi/cpp/instance.h" |
10 #include "ppapi/cpp/module.h" | 9 #include "ppapi/cpp/module.h" |
11 #include "ppapi/cpp/var.h" | 10 #include "ppapi/cpp/var.h" |
| 11 #include "ppapi/tests/test_utils.h" |
12 #include "ppapi/tests/testing_instance.h" | 12 #include "ppapi/tests/testing_instance.h" |
13 | 13 |
14 REGISTER_TEST_CASE(Flash); | 14 REGISTER_TEST_CASE(Flash); |
15 | 15 |
16 using pp::Var; | 16 using pp::Var; |
17 | 17 |
18 TestFlash::TestFlash(TestingInstance* instance) | 18 TestFlash::TestFlash(TestingInstance* instance) |
19 : TestCase(instance), | 19 : TestCase(instance), |
20 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { | 20 PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { |
21 } | 21 } |
22 | 22 |
23 bool TestFlash::Init() { | 23 bool TestFlash::Init() { |
24 flash_interface_ = static_cast<const PPB_Flash*>( | 24 flash_interface_ = static_cast<const PPB_Flash*>( |
25 pp::Module::Get()->GetBrowserInterface(PPB_FLASH_INTERFACE)); | 25 pp::Module::Get()->GetBrowserInterface(PPB_FLASH_INTERFACE)); |
26 return !!flash_interface_; | 26 return !!flash_interface_; |
27 } | 27 } |
28 | 28 |
29 void TestFlash::RunTests(const std::string& filter) { | 29 void TestFlash::RunTests(const std::string& filter) { |
30 RUN_TEST(SetInstanceAlwaysOnTop, filter); | 30 RUN_TEST(SetInstanceAlwaysOnTop, filter); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 flash_interface_->GetCommandLineArgs( | 95 flash_interface_->GetCommandLineArgs( |
96 pp::Module::Get()->pp_module())); | 96 pp::Module::Get()->pp_module())); |
97 ASSERT_TRUE(result.is_string()); | 97 ASSERT_TRUE(result.is_string()); |
98 | 98 |
99 PASS(); | 99 PASS(); |
100 } | 100 } |
101 | 101 |
102 void TestFlash::QuitMessageLoopTask(int32_t) { | 102 void TestFlash::QuitMessageLoopTask(int32_t) { |
103 flash_interface_->QuitMessageLoop(instance_->pp_instance()); | 103 flash_interface_->QuitMessageLoop(instance_->pp_instance()); |
104 } | 104 } |
OLD | NEW |