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

Side by Side Diff: content/browser/plugin_service_impl_browsertest.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 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) 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 "content/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "content/public/browser/browser_context.h" 11 #include "content/public/browser/browser_context.h"
12 #include "content/public/browser/plugin_service_filter.h" 12 #include "content/public/browser/plugin_service_filter.h"
13 #include "content/public/browser/resource_context.h" 13 #include "content/public/browser/resource_context.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
16 #include "content/public/test/test_browser_thread.h" 16 #include "content/public/test/test_browser_thread.h"
17 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
18 #include "content/shell/shell.h" 18 #include "content/shell/shell.h"
19 #include "content/test/content_browser_test.h" 19 #include "content/test/content_browser_test.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "webkit/plugins/npapi/plugin_list.h"
22 #include "webkit/plugins/npapi/plugin_utils.h" 21 #include "webkit/plugins/npapi/plugin_utils.h"
23 22
24 namespace content { 23 namespace content {
25 24
26 const char kNPAPITestPluginMimeType[] = "application/vnd.npapi-test"; 25 const char kNPAPITestPluginMimeType[] = "application/vnd.npapi-test";
27 26
28 void OpenChannel(PluginProcessHost::Client* client) { 27 void OpenChannel(PluginProcessHost::Client* client) {
29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 28 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
30 // Start opening the channel 29 // Start opening the channel
31 PluginServiceImpl::GetInstance()->OpenChannelToNpapiPlugin( 30 PluginServiceImpl::GetInstance()->OpenChannelToNpapiPlugin(
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 BrowserThread::IO, FROM_HERE, 369 BrowserThread::IO, FROM_HERE,
371 base::Bind(&OpenChannel, &mock_client)); 370 base::Bind(&OpenChannel, &mock_client));
372 RunMessageLoop(); 371 RunMessageLoop();
373 EXPECT_TRUE(mock_client.get_resource_context_called()); 372 EXPECT_TRUE(mock_client.get_resource_context_called());
374 EXPECT_TRUE(mock_client.set_plugin_info_called()); 373 EXPECT_TRUE(mock_client.set_plugin_info_called());
375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); 374 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called());
376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); 375 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called());
377 } 376 }
378 377
379 } // namespace content 378 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698