GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1
This eliminates a whole class of problems with SpawnedTestServer
failing to start.
BUG=96594, 98194
[email protected], [email protected], [email protected]
Review URL: https://codereview.chromium.org/16268017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208784 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/process_management_browsertest.cc b/chrome/browser/extensions/process_management_browsertest.cc
index d6ea919..bb54aeb 100644
--- a/chrome/browser/extensions/process_management_browsertest.cc
+++ b/chrome/browser/extensions/process_management_browsertest.cc
@@ -20,6 +20,7 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
using content::NavigationController;
using content::WebContents;
@@ -53,7 +54,7 @@
content::RenderProcessHost::SetMaxRendererProcessCount(1);
host_resolver()->AddRule("*", "127.0.0.1");
- ASSERT_TRUE(test_server()->Start());
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app1")));
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app2")));
@@ -63,8 +64,8 @@
// The app under test acts on URLs whose host is "localhost",
// so the URLs we navigate to must have host "localhost".
- GURL base_url = test_server()->GetURL(
- "files/extensions/");
+ GURL base_url = embedded_test_server()->GetURL(
+ "/extensions/");
GURL::Replacements replace_host;
std::string host_str("localhost"); // Must stay in scope with replace_host.
replace_host.SetHostStr(host_str);
@@ -194,12 +195,12 @@
content::RenderProcessHost::SetMaxRendererProcessCount(6);
host_resolver()->AddRule("*", "127.0.0.1");
- ASSERT_TRUE(test_server()->Start());
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
// The app under test acts on URLs whose host is "localhost",
// so the URLs we navigate to must have host "localhost".
- GURL base_url = test_server()->GetURL(
- "files/extensions/");
+ GURL base_url = embedded_test_server()->GetURL(
+ "/extensions/");
GURL::Replacements replace_host;
std::string host_str("localhost"); // Must stay in scope with replace_host.
replace_host.SetHostStr(host_str);