| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 PpapiUnittest::~PpapiUnittest() { | 72 PpapiUnittest::~PpapiUnittest() { |
| 73 DCHECK(current_unittest == this); | 73 DCHECK(current_unittest == this); |
| 74 current_unittest = NULL; | 74 current_unittest = NULL; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void PpapiUnittest::SetUp() { | 77 void PpapiUnittest::SetUp() { |
| 78 delegate_.reset(NewPluginDelegate()); | 78 delegate_.reset(NewPluginDelegate()); |
| 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", "1.0", 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(), NULL, GURL()); | 89 instance_ = PluginInstance::Create(delegate_.get(), module(), NULL, GURL()); |
| 90 } | 90 } |
| 91 | 91 |
| (...skipping 70 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 |