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 "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 "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
15 #include "content/public/browser/resource_context.h" | 15 #include "content/public/browser/resource_context.h" |
16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
17 #include "content/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "webkit/plugins/npapi/plugin_list.h" | 19 #include "webkit/plugins/npapi/plugin_list.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 const char kNPAPITestPluginMimeType[] = "application/vnd.npapi-test"; | 25 const char kNPAPITestPluginMimeType[] = "application/vnd.npapi-test"; |
26 | 26 |
27 void OpenChannel(PluginProcessHost::Client* client) { | 27 void OpenChannel(PluginProcessHost::Client* client) { |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 BrowserThread::IO, FROM_HERE, | 323 BrowserThread::IO, FROM_HERE, |
324 base::Bind(&OpenChannel, &mock_client)); | 324 base::Bind(&OpenChannel, &mock_client)); |
325 ui_test_utils::RunMessageLoop(); | 325 ui_test_utils::RunMessageLoop(); |
326 EXPECT_TRUE(mock_client.get_resource_context_called()); | 326 EXPECT_TRUE(mock_client.get_resource_context_called()); |
327 EXPECT_TRUE(mock_client.set_plugin_info_called()); | 327 EXPECT_TRUE(mock_client.set_plugin_info_called()); |
328 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); | 328 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); |
329 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); | 329 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); |
330 } | 330 } |
331 | 331 |
332 } // namespace | 332 } // namespace |
OLD | NEW |