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

Side by Side Diff: content/browser/web_contents/opened_by_dom_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "content/public/browser/web_contents_delegate.h" 8 #include "content/public/browser/web_contents_delegate.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // times and swapped processes. 116 // times and swapped processes.
117 // Crashes on all platforms. http://crbug.com/399709 117 // Crashes on all platforms. http://crbug.com/399709
118 IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, DISABLED_CrossProcessPopup) { 118 IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, DISABLED_CrossProcessPopup) {
119 host_resolver()->AddRule("*", "127.0.0.1"); 119 host_resolver()->AddRule("*", "127.0.0.1");
120 ASSERT_TRUE(test_server()->Start()); 120 ASSERT_TRUE(test_server()->Start());
121 121
122 GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1"); 122 GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1");
123 123
124 GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2"); 124 GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2");
125 GURL::Replacements replace_host; 125 GURL::Replacements replace_host;
126 std::string foo_com("foo.com"); 126 replace_host.SetHostStr("foo.com");
127 replace_host.SetHostStr(foo_com);
128 url2 = url2.ReplaceComponents(replace_host); 127 url2 = url2.ReplaceComponents(replace_host);
129 128
130 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3"); 129 GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3");
131 url3 = url3.ReplaceComponents(replace_host); 130 url3 = url3.ReplaceComponents(replace_host);
132 131
133 NavigateToURL(shell(), url1); 132 NavigateToURL(shell(), url1);
134 133
135 Shell* popup = OpenWindowFromJavaScript(shell(), url2); 134 Shell* popup = OpenWindowFromJavaScript(shell(), url2);
136 NavigateToURL(popup, url3); 135 NavigateToURL(popup, url3);
137 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents())); 136 EXPECT_TRUE(AttemptCloseFromJavaScript(popup->web_contents()));
138 } 137 }
139 138
140 } // namespace content 139 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/shared_worker/worker_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698