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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 TabContents* tab_contents = chrome::GetActiveTabContents(browser()); | 76 TabContents* tab_contents = chrome::GetActiveTabContents(browser()); |
77 | 77 |
78 EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked( | 78 EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked( |
79 CONTENT_SETTINGS_TYPE_COOKIES)); | 79 CONTENT_SETTINGS_TYPE_COOKIES)); |
80 } | 80 } |
81 | 81 |
82 #if !defined(USE_AURA) // No NPAPI plugins with Aura. | 82 #if !defined(USE_AURA) // No NPAPI plugins with Aura. |
83 | 83 |
84 class ClickToPlayPluginTest : public InProcessBrowserTest { | 84 class ClickToPlayPluginTest : public InProcessBrowserTest { |
85 public: | 85 public: |
86 ClickToPlayPluginTest() { | 86 ClickToPlayPluginTest() {} |
87 EnableDOMAutomation(); | |
88 } | |
89 | 87 |
90 #if defined(OS_MACOSX) | 88 #if defined(OS_MACOSX) |
91 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 89 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
92 FilePath plugin_dir; | 90 FilePath plugin_dir; |
93 PathService::Get(base::DIR_MODULE, &plugin_dir); | 91 PathService::Get(base::DIR_MODULE, &plugin_dir); |
94 plugin_dir = plugin_dir.AppendASCII("plugins"); | 92 plugin_dir = plugin_dir.AppendASCII("plugins"); |
95 // The plugins directory isn't read by default on the Mac, so it needs to be | 93 // The plugins directory isn't read by default on the Mac, so it needs to be |
96 // explicitly registered. | 94 // explicitly registered. |
97 command_line->AppendSwitchPath(switches::kExtraPluginDir, plugin_dir); | 95 command_line->AppendSwitchPath(switches::kExtraPluginDir, plugin_dir); |
98 } | 96 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 167 |
170 content::RenderViewHost* host = | 168 content::RenderViewHost* host = |
171 chrome::GetActiveWebContents(browser())->GetRenderViewHost(); | 169 chrome::GetActiveWebContents(browser())->GetRenderViewHost(); |
172 host->Send(new ChromeViewMsg_LoadBlockedPlugins( | 170 host->Send(new ChromeViewMsg_LoadBlockedPlugins( |
173 host->GetRoutingID(), std::string())); | 171 host->GetRoutingID(), std::string())); |
174 | 172 |
175 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 173 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
176 } | 174 } |
177 | 175 |
178 #endif // !defined(USE_AURA) | 176 #endif // !defined(USE_AURA) |
OLD | NEW |