| 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/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/extensions/crx_installer.h" | 7 #include "chrome/browser/extensions/crx_installer.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 tab_contents->render_view_host(), L"", | 86 tab_contents->render_view_host(), L"", |
| 87 L"window.domAutomationController.send(ContentHandlerPluginCreated());", | 87 L"window.domAutomationController.send(ContentHandlerPluginCreated());", |
| 88 &content_handler_plugin_created)); | 88 &content_handler_plugin_created)); |
| 89 | 89 |
| 90 EXPECT_EQ(should_create, embedded_plugin_created); | 90 EXPECT_EQ(should_create, embedded_plugin_created); |
| 91 EXPECT_EQ(should_create, content_handler_plugin_created); | 91 EXPECT_EQ(should_create, content_handler_plugin_created); |
| 92 } | 92 } |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // Test that the NaCl plugin isn't blocked for Webstore extensions. | 95 // Test that the NaCl plugin isn't blocked for Webstore extensions. |
| 96 // DISABLED http://crbug.com/92964 |
| 97 #if defined(OS_LINUX) && ARCH_CPU_32_BITS |
| 98 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, DISABLED_WebStoreExtension) { |
| 99 #else |
| 96 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, WebStoreExtension) { | 100 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, WebStoreExtension) { |
| 101 #endif |
| 97 ASSERT_TRUE(test_server()->Start()); | 102 ASSERT_TRUE(test_server()->Start()); |
| 98 | 103 |
| 99 const Extension* extension = InstallExtension(INSTALL_TYPE_FROM_WEBSTORE); | 104 const Extension* extension = InstallExtension(INSTALL_TYPE_FROM_WEBSTORE); |
| 100 ASSERT_TRUE(extension); | 105 ASSERT_TRUE(extension); |
| 101 CheckPluginsCreated(extension, true); | 106 CheckPluginsCreated(extension, true); |
| 102 } | 107 } |
| 103 | 108 |
| 104 // Test that the NaCl plugin is blocked for non-Webstore extensions. | 109 // Test that the NaCl plugin is blocked for non-Webstore extensions. |
| 105 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, NonWebStoreExtension) { | 110 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, NonWebStoreExtension) { |
| 106 ASSERT_TRUE(test_server()->Start()); | 111 ASSERT_TRUE(test_server()->Start()); |
| 107 | 112 |
| 108 const Extension* extension = InstallExtension(INSTALL_TYPE_NON_WEBSTORE); | 113 const Extension* extension = InstallExtension(INSTALL_TYPE_NON_WEBSTORE); |
| 109 ASSERT_TRUE(extension); | 114 ASSERT_TRUE(extension); |
| 110 CheckPluginsCreated(extension, false); | 115 CheckPluginsCreated(extension, false); |
| 111 } | 116 } |
| 112 | 117 |
| 113 // Test that the NaCl plugin isn't blocked for component extensions. | 118 // Test that the NaCl plugin isn't blocked for component extensions. |
| 119 // DISABLED http://crbug.com/92964 |
| 120 #if defined(OS_LINUX) && ARCH_CPU_32_BITS |
| 121 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, DISABLED_ComponentExtension) { |
| 122 #else |
| 114 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, ComponentExtension) { | 123 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, ComponentExtension) { |
| 124 #endif |
| 115 ASSERT_TRUE(test_server()->Start()); | 125 ASSERT_TRUE(test_server()->Start()); |
| 116 | 126 |
| 117 const Extension* extension = InstallExtension(INSTALL_TYPE_COMPONENT); | 127 const Extension* extension = InstallExtension(INSTALL_TYPE_COMPONENT); |
| 118 ASSERT_TRUE(extension); | 128 ASSERT_TRUE(extension); |
| 119 ASSERT_EQ(extension->location(), Extension::COMPONENT); | 129 ASSERT_EQ(extension->location(), Extension::COMPONENT); |
| 120 CheckPluginsCreated(extension, true); | 130 CheckPluginsCreated(extension, true); |
| 121 } | 131 } |
| 122 | 132 |
| 123 // Test that the NaCl plugin isn't blocked for unpacked extensions. | 133 // Test that the NaCl plugin isn't blocked for unpacked extensions. |
| 134 // DISABLED http://crbug.com/92964 |
| 135 #if defined(OS_LINUX) && ARCH_CPU_32_BITS |
| 136 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, DISABLED_UnpackedExtension) { |
| 137 #else |
| 124 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { | 138 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { |
| 139 #endif |
| 125 ASSERT_TRUE(test_server()->Start()); | 140 ASSERT_TRUE(test_server()->Start()); |
| 126 | 141 |
| 127 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); | 142 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); |
| 128 ASSERT_TRUE(extension); | 143 ASSERT_TRUE(extension); |
| 129 ASSERT_EQ(extension->location(), Extension::LOAD); | 144 ASSERT_EQ(extension->location(), Extension::LOAD); |
| 130 CheckPluginsCreated(extension, true); | 145 CheckPluginsCreated(extension, true); |
| 131 } | 146 } |
| 132 | 147 |
| 133 } // namespace | 148 } // namespace |
| 134 | 149 |
| OLD | NEW |