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

Unified Diff: content/browser/web_contents/opened_by_dom_browsertest.cc

Issue 1411073005: Migrating tests to use EmbeddedTestServer (/content) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/opened_by_dom_browsertest.cc
diff --git a/content/browser/web_contents/opened_by_dom_browsertest.cc b/content/browser/web_contents/opened_by_dom_browsertest.cc
index efca34f28fed87b9471ca26ef63f08cb1f1c0acc..afc78511be50c35efb1b0f9b5ccf76ab8a11dd6c 100644
--- a/content/browser/web_contents/opened_by_dom_browsertest.cc
+++ b/content/browser/web_contents/opened_by_dom_browsertest.cc
@@ -82,12 +82,12 @@ class OpenedByDOMTest : public ContentBrowserTest {
// Tests that window.close() does not work on a normal window that has navigated
// a few times.
IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, NormalWindow) {
- ASSERT_TRUE(test_server()->Start());
+ ASSERT_TRUE(embedded_test_server()->Start());
// window.close is allowed if the window was opened by DOM OR the back/forward
// list has only one element. Navigate a bit so the second condition is false.
- GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1");
- GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2");
+ GURL url1 = embedded_test_server()->GetURL("/site_isolation/blank.html?1");
+ GURL url2 = embedded_test_server()->GetURL("/site_isolation/blank.html?2");
NavigateToURL(shell(), url1);
NavigateToURL(shell(), url2);
@@ -99,11 +99,11 @@ IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, NormalWindow) {
// Tests that window.close() works in a popup window that has navigated a few
// times.
IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, Popup) {
- ASSERT_TRUE(test_server()->Start());
+ ASSERT_TRUE(embedded_test_server()->Start());
- GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1");
- GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2");
- GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3");
+ GURL url1 = embedded_test_server()->GetURL("/site_isolation/blank.html?1");
+ GURL url2 = embedded_test_server()->GetURL("/site_isolation/blank.html?2");
+ GURL url3 = embedded_test_server()->GetURL("/site_isolation/blank.html?3");
NavigateToURL(shell(), url1);
Shell* popup = OpenWindowFromJavaScript(shell(), url2);
@@ -115,16 +115,16 @@ IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, Popup) {
// times and swapped processes.
IN_PROC_BROWSER_TEST_F(OpenedByDOMTest, CrossProcessPopup) {
host_resolver()->AddRule("*", "127.0.0.1");
- ASSERT_TRUE(test_server()->Start());
+ ASSERT_TRUE(embedded_test_server()->Start());
- GURL url1 = test_server()->GetURL("files/site_isolation/blank.html?1");
+ GURL url1 = embedded_test_server()->GetURL("/site_isolation/blank.html?1");
- GURL url2 = test_server()->GetURL("files/site_isolation/blank.html?2");
+ GURL url2 = embedded_test_server()->GetURL("/site_isolation/blank.html?2");
GURL::Replacements replace_host;
replace_host.SetHostStr("foo.com");
url2 = url2.ReplaceComponents(replace_host);
- GURL url3 = test_server()->GetURL("files/site_isolation/blank.html?3");
+ GURL url3 = embedded_test_server()->GetURL("/site_isolation/blank.html?3");
url3 = url3.ReplaceComponents(replace_host);
NavigateToURL(shell(), url1);

Powered by Google App Engine
This is Rietveld 408576698