| 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" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 class PluginServiceTest : public ContentBrowserTest { | 137 class PluginServiceTest : public ContentBrowserTest { |
| 138 public: | 138 public: |
| 139 PluginServiceTest() {} | 139 PluginServiceTest() {} |
| 140 | 140 |
| 141 ResourceContext* GetResourceContext() { | 141 ResourceContext* GetResourceContext() { |
| 142 return shell()->web_contents()->GetBrowserContext()->GetResourceContext(); | 142 return shell()->web_contents()->GetBrowserContext()->GetResourceContext(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 145 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 146 #ifdef OS_MACOSX | 146 #if defined(OS_MACOSX) |
| 147 base::FilePath browser_directory; | 147 base::FilePath browser_directory; |
| 148 PathService::Get(base::DIR_MODULE, &browser_directory); | 148 PathService::Get(base::DIR_MODULE, &browser_directory); |
| 149 command_line->AppendSwitchPath(switches::kExtraPluginDir, | 149 command_line->AppendSwitchPath(switches::kExtraPluginDir, |
| 150 browser_directory.AppendASCII("plugins")); | 150 browser_directory.AppendASCII("plugins")); |
| 151 #endif | 151 #endif |
| 152 // TODO(jam): since these plugin tests are running under Chrome, we need to | 152 // TODO(jam): since these plugin tests are running under Chrome, we need to |
| 153 // tell it to disable its security features for old plugins. Once this is | 153 // tell it to disable its security features for old plugins. Once this is |
| 154 // running under content_browsertests, these flags won't be needed. | 154 // running under content_browsertests, these flags won't be needed. |
| 155 // http://crbug.com/90448 | 155 // http://crbug.com/90448 |
| 156 // switches::kAlwaysAuthorizePlugins | 156 // switches::kAlwaysAuthorizePlugins |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 BrowserThread::IO, FROM_HERE, | 370 BrowserThread::IO, FROM_HERE, |
| 371 base::Bind(&OpenChannel, &mock_client)); | 371 base::Bind(&OpenChannel, &mock_client)); |
| 372 RunMessageLoop(); | 372 RunMessageLoop(); |
| 373 EXPECT_TRUE(mock_client.get_resource_context_called()); | 373 EXPECT_TRUE(mock_client.get_resource_context_called()); |
| 374 EXPECT_TRUE(mock_client.set_plugin_info_called()); | 374 EXPECT_TRUE(mock_client.set_plugin_info_called()); |
| 375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); | 375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); |
| 376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); | 376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace content | 379 } // namespace content |
| OLD | NEW |