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

Side by Side Diff: chrome/renderer/pepper_devices_unittest.cc

Issue 2262002: Add ppapi plugins to about:plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months 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
OLDNEW
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 void PepperDeviceTest::SetUp() { 162 void PepperDeviceTest::SetUp() {
163 RenderViewTest::SetUp(); 163 RenderViewTest::SetUp();
164 164
165 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(version_info_); 165 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(version_info_);
166 166
167 // Create the WebKit plugin with no delegates (this seems to work 167 // Create the WebKit plugin with no delegates (this seems to work
168 // sufficiently for the test). 168 // sufficiently for the test).
169 WebKit::WebPluginParams params; 169 WebKit::WebPluginParams params;
170 plugin_.reset(new webkit_glue::WebPluginImpl( 170 plugin_.reset(new webkit_glue::WebPluginImpl(
171 NULL, params, base::WeakPtr<webkit_glue::WebPluginPageDelegate>())); 171 NULL, params, FilePath(), std::string(),
172 base::WeakPtr<webkit_glue::WebPluginPageDelegate>()));
172 173
173 // Create a pepper plugin for the RenderView. 174 // Create a pepper plugin for the RenderView.
174 pepper_plugin_ = WebPluginDelegatePepper::Create( 175 pepper_plugin_ = WebPluginDelegatePepper::Create(
175 plugin_path(), kTestPluginMimeType, view_->AsWeakPtr()); 176 plugin_path(), kTestPluginMimeType, view_->AsWeakPtr());
176 ASSERT_TRUE(pepper_plugin_); 177 ASSERT_TRUE(pepper_plugin_);
177 ASSERT_TRUE(pepper_plugin_->Initialize(GURL(), std::vector<std::string>(), 178 ASSERT_TRUE(pepper_plugin_->Initialize(GURL(), std::vector<std::string>(),
178 std::vector<std::string>(), 179 std::vector<std::string>(),
179 plugin_.get(), false)); 180 plugin_.get(), false));
180 181
181 // Normally the RenderView creates the pepper plugin and registers it with 182 // Normally the RenderView creates the pepper plugin and registers it with
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 EXPECT_EQ(NPERR_NO_ERROR, 270 EXPECT_EQ(NPERR_NO_ERROR,
270 pepper_plugin()->DeviceAudioInitializeContext(&config, &context)); 271 pepper_plugin()->DeviceAudioInitializeContext(&config, &context));
271 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( 272 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching(
272 ViewHostMsg_CreateAudioStream::ID)); 273 ViewHostMsg_CreateAudioStream::ID));
273 EXPECT_EQ(NPERR_NO_ERROR, 274 EXPECT_EQ(NPERR_NO_ERROR,
274 pepper_plugin()->DeviceAudioDestroyContext(&context)); 275 pepper_plugin()->DeviceAudioDestroyContext(&context));
275 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching( 276 EXPECT_TRUE(render_thread_.sink().GetFirstMessageMatching(
276 ViewHostMsg_CloseAudioStream::ID)); 277 ViewHostMsg_CloseAudioStream::ID));
277 } 278 }
278 279
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698