OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/ppapi_unittest.h" | 5 #include "webkit/plugins/ppapi/ppapi_unittest.h" |
6 | 6 |
7 #include "ppapi/c/pp_var.h" | 7 #include "ppapi/c/pp_var.h" |
8 #include "ppapi/c/ppp_instance.h" | 8 #include "ppapi/c/ppp_instance.h" |
9 #include "ppapi/shared_impl/ppapi_permissions.h" | 9 #include "ppapi/shared_impl/ppapi_permissions.h" |
10 #include "webkit/plugins/ppapi/gfx_conversion.h" | 10 #include "webkit/plugins/ppapi/gfx_conversion.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Initialize the mock module. | 80 // Initialize the mock module. |
81 module_ = new PluginModule("Mock plugin", FilePath(), this, | 81 module_ = new PluginModule("Mock plugin", FilePath(), this, |
82 ::ppapi::PpapiPermissions()); | 82 ::ppapi::PpapiPermissions()); |
83 PluginModule::EntryPoints entry_points; | 83 PluginModule::EntryPoints entry_points; |
84 entry_points.get_interface = &MockGetInterface; | 84 entry_points.get_interface = &MockGetInterface; |
85 entry_points.initialize_module = &MockInitializeModule; | 85 entry_points.initialize_module = &MockInitializeModule; |
86 ASSERT_TRUE(module_->InitAsInternalPlugin(entry_points)); | 86 ASSERT_TRUE(module_->InitAsInternalPlugin(entry_points)); |
87 | 87 |
88 // Initialize the mock instance. | 88 // Initialize the mock instance. |
89 instance_ = PluginInstance::Create(delegate_.get(), module()); | 89 instance_ = PluginInstance::Create(delegate_.get(), module(), NULL, GURL()); |
90 } | 90 } |
91 | 91 |
92 void PpapiUnittest::TearDown() { | 92 void PpapiUnittest::TearDown() { |
93 instance_ = NULL; | 93 instance_ = NULL; |
94 module_ = NULL; | 94 module_ = NULL; |
95 } | 95 } |
96 | 96 |
97 MockPluginDelegate* PpapiUnittest::NewPluginDelegate() { | 97 MockPluginDelegate* PpapiUnittest::NewPluginDelegate() { |
98 return new MockPluginDelegate; | 98 return new MockPluginDelegate; |
99 } | 99 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 reset_result(); | 162 reset_result(); |
163 PpapiInterfaceFactoryManager::GetInstance()->UnregisterFactory( | 163 PpapiInterfaceFactoryManager::GetInstance()->UnregisterFactory( |
164 PpapiCustomInterfaceFactoryTest::InterfaceFactory); | 164 PpapiCustomInterfaceFactoryTest::InterfaceFactory); |
165 | 165 |
166 (*PluginModule::GetLocalGetInterfaceFunc())("DummyInterface"); | 166 (*PluginModule::GetLocalGetInterfaceFunc())("DummyInterface"); |
167 EXPECT_FALSE(result()); | 167 EXPECT_FALSE(result()); |
168 } | 168 } |
169 | 169 |
170 } // namespace ppapi | 170 } // namespace ppapi |
171 } // namespace webkit | 171 } // namespace webkit |
OLD | NEW |