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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_service.h" | |
9 #include "build/build_config.h" | 8 #include "build/build_config.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
11 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_commands.h" | 14 #include "chrome/browser/ui/browser_commands.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 #include "chrome/test/base/test_switches.h" | 17 #include "chrome/test/base/test_switches.h" |
19 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
20 #include "components/content_settings/core/browser/host_content_settings_map.h" | 19 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 20 #include "components/prefs/pref_service.h" |
21 #include "content/public/browser/navigation_controller.h" | 21 #include "content/public/browser/navigation_controller.h" |
22 #include "content/public/browser/plugin_service.h" | 22 #include "content/public/browser/plugin_service.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/test/browser_test_utils.h" | 24 #include "content/public/test/browser_test_utils.h" |
25 #include "extensions/browser/extension_registry.h" | 25 #include "extensions/browser/extension_registry.h" |
26 #include "extensions/browser/extension_system.h" | 26 #include "extensions/browser/extension_system.h" |
27 #include "extensions/common/extension.h" | 27 #include "extensions/common/extension.h" |
28 #include "net/base/filename_util.h" | 28 #include "net/base/filename_util.h" |
29 | 29 |
30 using content::NavigationController; | 30 using content::NavigationController; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 EXPECT_TRUE(result); | 191 EXPECT_TRUE(result); |
192 #endif | 192 #endif |
193 | 193 |
194 // Now load it through a file URL. The plugin should not load. | 194 // Now load it through a file URL. The plugin should not load. |
195 ui_test_utils::NavigateToURL(browser(), | 195 ui_test_utils::NavigateToURL(browser(), |
196 net::FilePathToFileURL(extension_dir.AppendASCII("test.html"))); | 196 net::FilePathToFileURL(extension_dir.AppendASCII("test.html"))); |
197 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 197 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
198 tab, "testPluginWorks()", &result)); | 198 tab, "testPluginWorks()", &result)); |
199 EXPECT_FALSE(result); | 199 EXPECT_FALSE(result); |
200 } | 200 } |
OLD | NEW |