OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 pepper_plugin_ = WebPluginDelegatePepper::Create( | 175 pepper_plugin_ = WebPluginDelegatePepper::Create( |
176 plugin_path(), kTestPluginMimeType, view_->AsWeakPtr()); | 176 plugin_path(), kTestPluginMimeType, view_->AsWeakPtr()); |
177 ASSERT_TRUE(pepper_plugin_); | 177 ASSERT_TRUE(pepper_plugin_); |
178 ASSERT_TRUE(pepper_plugin_->Initialize(GURL(), std::vector<std::string>(), | 178 ASSERT_TRUE(pepper_plugin_->Initialize(GURL(), std::vector<std::string>(), |
179 std::vector<std::string>(), | 179 std::vector<std::string>(), |
180 plugin_.get(), false)); | 180 plugin_.get(), false)); |
181 | 181 |
182 // Normally the RenderView creates the pepper plugin and registers it with | 182 // Normally the RenderView creates the pepper plugin and registers it with |
183 // its internal list. Since we're creating it manually, we have to reach in | 183 // its internal list. Since we're creating it manually, we have to reach in |
184 // and register it to prevent tear-down from asserting. | 184 // and register it to prevent tear-down from asserting. |
185 view_->current_pepper_plugins_.insert(pepper_plugin_); | 185 view_->current_oldstyle_pepper_plugins_.insert(pepper_plugin_); |
186 | 186 |
187 active_tests[npp()] = this; | 187 active_tests[npp()] = this; |
188 | 188 |
189 // Need to specify a window size or graphics calls will fail on the 0x0 | 189 // Need to specify a window size or graphics calls will fail on the 0x0 |
190 // bitmap. | 190 // bitmap. |
191 gfx::Rect rect(0, 0, 100, 100); | 191 gfx::Rect rect(0, 0, 100, 100); |
192 view_->OnResize(rect.size(), gfx::Rect()); | 192 view_->OnResize(rect.size(), gfx::Rect()); |
193 pepper_plugin_->UpdateGeometry(rect, rect); | 193 pepper_plugin_->UpdateGeometry(rect, rect); |
194 } | 194 } |
195 | 195 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 EXPECT_EQ(NPERR_NO_ERROR, | 270 EXPECT_EQ(NPERR_NO_ERROR, |
271 pepper_plugin()->DeviceAudioInitializeContext(&config, &context)); | 271 pepper_plugin()->DeviceAudioInitializeContext(&config, &context)); |
272 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( | 272 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( |
273 ViewHostMsg_CreateAudioStream::ID)); | 273 ViewHostMsg_CreateAudioStream::ID)); |
274 EXPECT_EQ(NPERR_NO_ERROR, | 274 EXPECT_EQ(NPERR_NO_ERROR, |
275 pepper_plugin()->DeviceAudioDestroyContext(&context)); | 275 pepper_plugin()->DeviceAudioDestroyContext(&context)); |
276 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( | 276 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( |
277 ViewHostMsg_CloseAudioStream::ID)); | 277 ViewHostMsg_CloseAudioStream::ID)); |
278 } | 278 } |
279 | 279 |
OLD | NEW |