OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/synchronization/waitable_event_watcher.h" | 8 #include "base/synchronization/waitable_event_watcher.h" |
9 #include "content/browser/plugin_data_remover_impl.h" | 9 #include "content/browser/plugin_data_remover_impl.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 MessageLoop::current()->Quit(); | 26 MessageLoop::current()->Quit(); |
27 } | 27 } |
28 | 28 |
29 virtual void SetUpCommandLine(CommandLine* command_line) { | 29 virtual void SetUpCommandLine(CommandLine* command_line) { |
30 #ifdef OS_MACOSX | 30 #ifdef OS_MACOSX |
31 FilePath browser_directory; | 31 FilePath browser_directory; |
32 PathService::Get(base::DIR_MODULE, &browser_directory); | 32 PathService::Get(base::DIR_MODULE, &browser_directory); |
33 command_line->AppendSwitchPath(switches::kExtraPluginDir, | 33 command_line->AppendSwitchPath(switches::kExtraPluginDir, |
34 browser_directory.AppendASCII("plugins")); | 34 browser_directory.AppendASCII("plugins")); |
35 #endif | 35 #endif |
| 36 // TODO(jam): since these plugin tests are running under Chrome, we need to |
| 37 // tell it to disable its security features for old plugins. Once this is |
| 38 // running under content_browsertests, these flags won't be needed. |
| 39 // http://crbug.com/90448 |
| 40 // switches::kAlwaysAuthorizePlugins |
| 41 command_line->AppendSwitch("always-authorize-plugins"); |
36 } | 42 } |
37 }; | 43 }; |
38 | 44 |
39 IN_PROC_BROWSER_TEST_F(PluginDataRemoverTest, RemoveData) { | 45 IN_PROC_BROWSER_TEST_F(PluginDataRemoverTest, RemoveData) { |
40 PluginDataRemoverImpl plugin_data_remover(GetBrowserContext()); | 46 PluginDataRemoverImpl plugin_data_remover(GetBrowserContext()); |
41 plugin_data_remover.set_mime_type(kNPAPITestPluginMimeType); | 47 plugin_data_remover.set_mime_type(kNPAPITestPluginMimeType); |
42 base::WaitableEventWatcher watcher; | 48 base::WaitableEventWatcher watcher; |
43 base::WaitableEvent* event = | 49 base::WaitableEvent* event = |
44 plugin_data_remover.StartRemoving(base::Time()); | 50 plugin_data_remover.StartRemoving(base::Time()); |
45 watcher.StartWatching(event, this); | 51 watcher.StartWatching(event, this); |
46 ui_test_utils::RunMessageLoop(); | 52 ui_test_utils::RunMessageLoop(); |
47 } | 53 } |
48 | 54 |
49 } // namespace content | 55 } // namespace content |
OLD | NEW |