Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/browser/extensions/extension_nacl_browsertest.cc

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 12 matching lines...) Expand all
23 #include "extensions/browser/extension_system.h" 23 #include "extensions/browser/extension_system.h"
24 #include "net/dns/mock_host_resolver.h" 24 #include "net/dns/mock_host_resolver.h"
25 25
26 using content::PluginService; 26 using content::PluginService;
27 using content::WebContents; 27 using content::WebContents;
28 using extensions::Extension; 28 using extensions::Extension;
29 using extensions::Manifest; 29 using extensions::Manifest;
30 30
31 namespace { 31 namespace {
32 32
33 const char* kExtensionId = "bjjcibdiodkkeanflmiijlcfieiemced"; 33 const char kExtensionId[] = "bjjcibdiodkkeanflmiijlcfieiemced";
34 34
35 // This class tests that the Native Client plugin is blocked unless the 35 // This class tests that the Native Client plugin is blocked unless the
36 // .nexe is part of an extension from the Chrome Webstore. 36 // .nexe is part of an extension from the Chrome Webstore.
37 class NaClExtensionTest : public ExtensionBrowserTest { 37 class NaClExtensionTest : public ExtensionBrowserTest {
38 public: 38 public:
39 NaClExtensionTest() {} 39 NaClExtensionTest() {}
40 40
41 protected: 41 protected:
42 enum InstallType { 42 enum InstallType {
43 INSTALL_TYPE_COMPONENT, 43 INSTALL_TYPE_COMPONENT,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 (expected_to_succeed & PLUGIN_TYPE_EMBED) != 0); 135 (expected_to_succeed & PLUGIN_TYPE_EMBED) != 0);
136 EXPECT_EQ(content_handler_plugin_created, 136 EXPECT_EQ(content_handler_plugin_created,
137 (expected_to_succeed & PLUGIN_TYPE_CONTENT_HANDLER) != 0); 137 (expected_to_succeed & PLUGIN_TYPE_CONTENT_HANDLER) != 0);
138 } 138 }
139 139
140 void CheckPluginsCreated(const Extension* extension, 140 void CheckPluginsCreated(const Extension* extension,
141 PluginType expected_to_succeed) { 141 PluginType expected_to_succeed) {
142 CheckPluginsCreated(extension->GetResourceURL("test.html"), 142 CheckPluginsCreated(extension->GetResourceURL("test.html"),
143 expected_to_succeed); 143 expected_to_succeed);
144 } 144 }
145
146 }; 145 };
147 146
148 // Test that the NaCl plugin isn't blocked for Webstore extensions. 147 // Test that the NaCl plugin isn't blocked for Webstore extensions.
149 // Disabled: http://crbug.com/319892 148 // Disabled: http://crbug.com/319892
150 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, DISABLED_WebStoreExtension) { 149 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, DISABLED_WebStoreExtension) {
151 ASSERT_TRUE(test_server()->Start()); 150 ASSERT_TRUE(test_server()->Start());
152 151
153 const Extension* extension = InstallExtension(INSTALL_TYPE_FROM_WEBSTORE); 152 const Extension* extension = InstallExtension(INSTALL_TYPE_FROM_WEBSTORE);
154 ASSERT_TRUE(extension); 153 ASSERT_TRUE(extension);
155 CheckPluginsCreated(extension, PLUGIN_TYPE_ALL); 154 CheckPluginsCreated(extension, PLUGIN_TYPE_ALL);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 replace_host.SetHostStr(host_str); 210 replace_host.SetHostStr(host_str);
212 replace_host.ClearPort(); 211 replace_host.ClearPort();
213 url = url.ReplaceComponents(replace_host); 212 url = url.ReplaceComponents(replace_host);
214 213
215 const Extension* extension = InstallHostedApp(); 214 const Extension* extension = InstallHostedApp();
216 ASSERT_TRUE(extension); 215 ASSERT_TRUE(extension);
217 CheckPluginsCreated(url, PLUGIN_TYPE_ALL); 216 CheckPluginsCreated(url, PLUGIN_TYPE_ALL);
218 } 217 }
219 218
220 } // namespace 219 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_messages_apitest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698