| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/crx_installer.h" | 9 #include "chrome/browser/extensions/crx_installer.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 19 #include "content/browser/plugin_service.h" | |
| 20 #include "content/browser/tab_contents/tab_contents.h" | 19 #include "content/browser/tab_contents/tab_contents.h" |
| 20 #include "content/public/browser/plugin_service.h" |
| 21 #include "webkit/plugins/webplugininfo.h" |
| 22 |
| 23 using content::PluginService; |
| 21 | 24 |
| 22 namespace { | 25 namespace { |
| 23 | 26 |
| 24 const char* kExtensionId = "bjjcibdiodkkeanflmiijlcfieiemced"; | 27 const char* kExtensionId = "bjjcibdiodkkeanflmiijlcfieiemced"; |
| 25 | 28 |
| 26 // This class tests that the Native Client plugin is blocked unless the | 29 // This class tests that the Native Client plugin is blocked unless the |
| 27 // .nexe is part of an extension from the Chrome Webstore. | 30 // .nexe is part of an extension from the Chrome Webstore. |
| 28 class NaClExtensionTest : public ExtensionBrowserTest { | 31 class NaClExtensionTest : public ExtensionBrowserTest { |
| 29 public: | 32 public: |
| 30 NaClExtensionTest() { | 33 NaClExtensionTest() { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { | 144 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { |
| 142 ASSERT_TRUE(test_server()->Start()); | 145 ASSERT_TRUE(test_server()->Start()); |
| 143 | 146 |
| 144 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); | 147 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); |
| 145 ASSERT_TRUE(extension); | 148 ASSERT_TRUE(extension); |
| 146 ASSERT_EQ(extension->location(), Extension::LOAD); | 149 ASSERT_EQ(extension->location(), Extension::LOAD); |
| 147 CheckPluginsCreated(extension, true); | 150 CheckPluginsCreated(extension, true); |
| 148 } | 151 } |
| 149 | 152 |
| 150 } // namespace | 153 } // namespace |
| OLD | NEW |