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

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

Issue 889463003: GURL::Replacements methods accept a StringPiece instead of std::string&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (fixed some merge conflicts). Created 5 years, 10 months 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 PLUGIN_TYPE_CONTENT_HANDLER); 199 PLUGIN_TYPE_CONTENT_HANDLER);
200 } 200 }
201 201
202 // Test that NaCl plugin isn't blocked for hosted app URLs. 202 // Test that NaCl plugin isn't blocked for hosted app URLs.
203 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, HostedApp) { 203 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, HostedApp) {
204 host_resolver()->AddRule("*", "127.0.0.1"); 204 host_resolver()->AddRule("*", "127.0.0.1");
205 ASSERT_TRUE(test_server()->Start()); 205 ASSERT_TRUE(test_server()->Start());
206 206
207 GURL url = test_server()->GetURL("files/extensions/native_client/test.html"); 207 GURL url = test_server()->GetURL("files/extensions/native_client/test.html");
208 GURL::Replacements replace_host; 208 GURL::Replacements replace_host;
209 std::string host_str("localhost"); 209 replace_host.SetHostStr("localhost");
210 replace_host.SetHostStr(host_str);
211 replace_host.ClearPort(); 210 replace_host.ClearPort();
212 url = url.ReplaceComponents(replace_host); 211 url = url.ReplaceComponents(replace_host);
213 212
214 const Extension* extension = InstallHostedApp(); 213 const Extension* extension = InstallHostedApp();
215 ASSERT_TRUE(extension); 214 ASSERT_TRUE(extension);
216 CheckPluginsCreated(url, PLUGIN_TYPE_ALL); 215 CheckPluginsCreated(url, PLUGIN_TYPE_ALL);
217 } 216 }
218 217
219 } // namespace 218 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698