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

Unified Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 12210088: Make the TestServer use an absolute document root path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testserver uses absolute docroot path Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prerender/prerender_browsertest.cc
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 5589d1298a7a85c8aca135449e816a6fdf211ef5..b9349cc09b4caae29862105a2e66d19f51ff0b4a 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -1010,7 +1010,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest {
https_src_server.reset(
new net::TestServer(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))));
+ net::TestServer::GetTestDataPath()));
ASSERT_TRUE(https_src_server->Start());
src_server = https_src_server.get();
}
@@ -1515,7 +1515,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHttps) {
net::TestServer https_server(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
PrerenderTestURL(https_url,
@@ -1528,7 +1528,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderHttps) {
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderClientRedirectToHttps) {
net::TestServer https_server(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
PrerenderTestURL(CreateClientRedirect(https_url.spec()),
@@ -1563,7 +1563,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
PrerenderClientRedirectToHttpsInIframe) {
net::TestServer https_server(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
std::string redirect_path = CreateClientRedirect(https_url.spec());
@@ -1621,7 +1621,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
PrerenderServerRedirectToHttps) {
net::TestServer https_server(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
PrerenderTestURL(CreateServerRedirect(https_url.spec()),
@@ -1656,7 +1656,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
PrerenderServerRedirectToHttpsInIframe) {
net::TestServer https_server(
net::TestServer::TYPE_HTTPS, net::TestServer::kLocalhost,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
std::string redirect_path = CreateServerRedirect(https_url.spec());
@@ -2133,9 +2133,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLErrorTopLevel) {
net::TestServer::SSLOptions ssl_options;
ssl_options.server_certificate =
net::TestServer::SSLOptions::CERT_MISMATCHED_NAME;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
PrerenderTestURL(https_url,
@@ -2150,9 +2150,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLErrorSubresource) {
net::TestServer::SSLOptions ssl_options;
ssl_options.server_certificate =
net::TestServer::SSLOptions::CERT_MISMATCHED_NAME;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/image.jpeg");
std::vector<net::TestServer::StringPair> replacement_text;
@@ -2174,9 +2174,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLErrorIframe) {
net::TestServer::SSLOptions ssl_options;
ssl_options.server_certificate =
net::TestServer::SSLOptions::CERT_MISMATCHED_NAME;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL(
"files/prerender/prerender_embedded_content.html");
@@ -2224,9 +2224,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLClientCertTopLevel) {
net::TestServer::SSLOptions ssl_options;
ssl_options.request_client_certificate = true;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/prerender_page.html");
PrerenderTestURL(https_url, FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED, 1);
@@ -2238,9 +2238,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
PrerenderSSLClientCertSubresource) {
net::TestServer::SSLOptions ssl_options;
ssl_options.request_client_certificate = true;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL("files/prerender/image.jpeg");
std::vector<net::TestServer::StringPair> replacement_text;
@@ -2261,9 +2261,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLClientCertIframe) {
net::TestServer::SSLOptions ssl_options;
ssl_options.request_client_certificate = true;
- net::TestServer https_server(
- net::TestServer::TYPE_HTTPS, ssl_options,
- base::FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ net::TestServer https_server(
+ net::TestServer::TYPE_HTTPS, ssl_options,
+ net::TestServer::GetTestDataPath());
ASSERT_TRUE(https_server.Start());
GURL https_url = https_server.GetURL(
"files/prerender/prerender_embedded_content.html");

Powered by Google App Engine
This is Rietveld 408576698