summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_browsertest.cc6
-rw-r--r--chrome/browser/browser_uitest.cc6
-rw-r--r--chrome/browser/chrome_plugin_unittest.cc3
-rw-r--r--chrome/browser/collected_cookies_uitest.cc6
-rw-r--r--chrome/browser/errorpage_uitest.cc2
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc6
-rw-r--r--chrome/browser/history/multipart_uitest.cc2
-rw-r--r--chrome/browser/history/redirect_uitest.cc24
-rw-r--r--chrome/browser/login_prompt_uitest.cc18
-rw-r--r--chrome/browser/net/connection_tester_unittest.cc4
-rw-r--r--chrome/browser/notifications/notifications_interactive_uitest.cc6
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc12
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc15
-rw-r--r--chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc6
-rw-r--r--chrome/browser/repost_form_warning_uitest.cc6
-rw-r--r--chrome/browser/session_history_uitest.cc27
-rw-r--r--chrome/browser/sessions/session_restore_uitest.cc3
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc2
-rw-r--r--chrome/browser/sync/glue/http_bridge_unittest.cc12
-rw-r--r--chrome/browser/tab_contents/view_source_uitest.cc12
-rw-r--r--chrome/browser/tab_restore_uitest.cc9
-rw-r--r--chrome/browser/views/find_bar_host_interactive_uitest.cc6
-rw-r--r--chrome/browser/views/find_bar_host_uitest.cc2
-rw-r--r--chrome/common/net/url_fetcher_unittest.cc31
-rw-r--r--chrome/renderer/external_extension_uitest.cc2
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc3
-rw-r--r--chrome/test/in_process_browser_test.cc4
-rw-r--r--chrome/test/interactive_ui/infobars_uitest.cc3
-rw-r--r--chrome/test/ui/ppapi_uitest.cc4
-rw-r--r--chrome/worker/worker_uitest.cc6
30 files changed, 89 insertions, 159 deletions
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc
index 0525058..30324d0 100644
--- a/chrome/browser/browser_browsertest.cc
+++ b/chrome/browser/browser_browsertest.cc
@@ -330,7 +330,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) {
CommandUpdater* command_updater = browser()->command_updater();
scoped_refptr<HTTPTestServer> http_server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != http_server.get());
GURL http_url(http_server->TestServerPage(""));
ASSERT_TRUE(http_url.SchemeIs(chrome::kHttpScheme));
@@ -389,7 +389,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutInvalid) {
IN_PROC_BROWSER_TEST_F(BrowserTest, FaviconOfOnloadRedirectToAnchorPage) {
static const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url(server->TestServerPage("files/onload_redirect_to_anchor.html"));
GURL expected_favicon_url(server->TestServerPage("files/test.png"));
@@ -510,7 +510,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, AppTabRemovedWhenExtensionUninstalled) {
IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageLanguageDetection) {
static const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
TabContents* current_tab = browser()->GetSelectedTabContents();
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc
index 2058b18..d1976be 100644
--- a/chrome/browser/browser_uitest.cc
+++ b/chrome/browser/browser_uitest.cc
@@ -86,8 +86,7 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
return;
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
FilePath test_file(test_data_directory_);
scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
@@ -137,8 +136,7 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) {
return;
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
FilePath test_file(test_data_directory_);
scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
diff --git a/chrome/browser/chrome_plugin_unittest.cc b/chrome/browser/chrome_plugin_unittest.cc
index 3116a2f..7420458 100644
--- a/chrome/browser/chrome_plugin_unittest.cc
+++ b/chrome/browser/chrome_plugin_unittest.cc
@@ -278,8 +278,7 @@ TEST_F(ChromePluginTest, CanMakeGETRequestAsync) {
// Tests that the plugin can issue a POST request.
TEST_F(ChromePluginTest, CanMakePOSTRequest) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = server->TestServerPage("echo");
diff --git a/chrome/browser/collected_cookies_uitest.cc b/chrome/browser/collected_cookies_uitest.cc
index cfd3b1e..d51626a 100644
--- a/chrome/browser/collected_cookies_uitest.cc
+++ b/chrome/browser/collected_cookies_uitest.cc
@@ -23,8 +23,7 @@ typedef UITest CollectedCookiesTest;
// Test is flaky. http://crbug.com/49539
TEST_F(CollectedCookiesTest, FLAKY_DoubleDisplay) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
@@ -46,8 +45,7 @@ TEST_F(CollectedCookiesTest, FLAKY_DoubleDisplay) {
// Test is flaky. http://crbug.com/49539
TEST_F(CollectedCookiesTest, FLAKY_NavigateAway) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc
index 3196a50..b7a0efb3 100644
--- a/chrome/browser/errorpage_uitest.cc
+++ b/chrome/browser/errorpage_uitest.cc
@@ -169,7 +169,7 @@ TEST_F(ErrorPageTest, IFrame404) {
// when the iframe loads. If the iframe fails to load (because an alternate
// error page loads instead), then the title will remain as "FAIL".
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ HTTPTestServer::CreateServer(L"chrome/test/data");
ASSERT_TRUE(NULL != server.get());
GURL test_url = server->TestServerPage("files/iframe404.html");
NavigateToURL(test_url);
diff --git a/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc b/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
index c04201e..c27c9ff 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
@@ -27,8 +27,7 @@ class BookmarkBarGtkBrowserTest : public InProcessBrowserTest {
// Makes sure that when you switch back to an NTP with an active findbar,
// the findbar is above the floating bookmark bar.
IN_PROC_BROWSER_TEST_F(BookmarkBarGtkBrowserTest, FindBarTest) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// Create new tab; open findbar.
@@ -55,8 +54,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkBarGtkBrowserTest, FindBarTest) {
// Makes sure that you can click on the floating bookmark bar.
IN_PROC_BROWSER_TEST_F(BookmarkBarGtkBrowserTest, ClickOnFloatingTest) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GtkWidget* other_bookmarks =
diff --git a/chrome/browser/history/multipart_uitest.cc b/chrome/browser/history/multipart_uitest.cc
index a8fcf4c..4cf86b1 100644
--- a/chrome/browser/history/multipart_uitest.cc
+++ b/chrome/browser/history/multipart_uitest.cc
@@ -24,7 +24,7 @@ TEST_F(MultipartResponseUITest, SingleVisit) {
// creates one entry in the visits table.
const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ HTTPTestServer::CreateServer(kDocRoot);
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc
index f7a1669..4c3fe38 100644
--- a/chrome/browser/history/redirect_uitest.cc
+++ b/chrome/browser/history/redirect_uitest.cc
@@ -25,8 +25,7 @@ typedef UITest RedirectTest;
// Tests a single server redirect
TEST_F(RedirectTest, Server) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL final_url = server->TestServerPage(std::string());
@@ -47,8 +46,7 @@ TEST_F(RedirectTest, Server) {
// Tests a single client redirect.
TEST_F(RedirectTest, Client) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL final_url = server->TestServerPage(std::string());
@@ -81,8 +79,7 @@ TEST_F(RedirectTest, Client) {
}
TEST_F(RedirectTest, ClientEmptyReferer) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL final_url = server->TestServerPage(std::string());
@@ -141,8 +138,7 @@ TEST_F(RedirectTest, ClientCancelled) {
// Tests a client->server->server redirect
TEST_F(RedirectTest, ClientServerServer) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL final_url = server->TestServerPage(std::string());
@@ -175,8 +171,7 @@ TEST_F(RedirectTest, ClientServerServer) {
// Tests that the "#reference" gets preserved across server redirects.
TEST_F(RedirectTest, ServerReference) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
const std::string ref("reference");
@@ -195,8 +190,7 @@ TEST_F(RedirectTest, ServerReference) {
// A) does not crash the browser or confuse the redirect chain, see bug 1080873
// B) does not take place.
TEST_F(RedirectTest, NoHttpToFile) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
FilePath test_file(test_data_directory_);
test_file = test_file.AppendASCII("http_to_file.html");
@@ -218,8 +212,7 @@ TEST_F(RedirectTest, NoHttpToFile) {
// Ensures that non-user initiated location changes (within page) are
// flagged as client redirects. See bug 1139823.
TEST_F(RedirectTest, ClientFragments) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
FilePath test_file(test_data_directory_);
@@ -252,8 +245,7 @@ TEST_F(RedirectTest,
// which causes it to start a provisional load, and while it is waiting
// for the response (which means it hasn't committed the load for the client
// redirect destination page yet), we issue a new navigation request.
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL final_url = server->TestServerPage("files/title2.html");
diff --git a/chrome/browser/login_prompt_uitest.cc b/chrome/browser/login_prompt_uitest.cc
index e1dc5af..e273fe6 100644
--- a/chrome/browser/login_prompt_uitest.cc
+++ b/chrome/browser/login_prompt_uitest.cc
@@ -51,8 +51,7 @@ wstring ExpectedTitleFromAuth(const wstring& username,
// Test that "Basic" HTTP authentication works.
TEST_F(LoginPromptTest, TestBasicAuth) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
@@ -74,8 +73,7 @@ TEST_F(LoginPromptTest, TestBasicAuth) {
// Test that "Digest" HTTP authentication works.
TEST_F(LoginPromptTest, TestDigestAuth) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
@@ -96,8 +94,7 @@ TEST_F(LoginPromptTest, TestDigestAuth) {
// Test that logging in on 2 tabs at once works.
TEST_F(LoginPromptTest, TestTwoAuths) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> basic_tab(GetActiveTab());
@@ -125,8 +122,7 @@ TEST_F(LoginPromptTest, TestTwoAuths) {
// Test that cancelling authentication works.
TEST_F(LoginPromptTest, TestCancelAuth) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
@@ -165,8 +161,7 @@ TEST_F(LoginPromptTest, TestCancelAuth) {
// If multiple tabs are looking for the same auth, the user should only have to
// enter it once (http://crbug.com/8914).
TEST_F(LoginPromptTest, SupplyRedundantAuths) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> basic_tab1(GetActiveTab());
@@ -200,8 +195,7 @@ TEST_F(LoginPromptTest, SupplyRedundantAuths) {
// If multiple tabs are looking for the same auth, and one is cancelled, the
// other should be cancelled as well.
TEST_F(LoginPromptTest, CancelRedundantAuths) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> basic_tab1(GetActiveTab());
diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc
index 4b356b1..bb6dbf8 100644
--- a/chrome/browser/net/connection_tester_unittest.cc
+++ b/chrome/browser/net/connection_tester_unittest.cc
@@ -88,7 +88,7 @@ class ConnectionTesterTest : public PlatformTest {
TEST_F(ConnectionTesterTest, RunAllTests) {
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateForkingServer(L"net/data/url_request_unittest/");
+ HTTPTestServer::CreateServer(L"net/data/url_request_unittest/");
ConnectionTester tester(&test_delegate_);
@@ -114,7 +114,7 @@ TEST_F(ConnectionTesterTest, RunAllTests) {
TEST_F(ConnectionTesterTest, DeleteWhileInProgress) {
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateForkingServer(L"net/data/url_request_unittest/");
+ HTTPTestServer::CreateServer(L"net/data/url_request_unittest/");
scoped_ptr<ConnectionTester> tester(new ConnectionTester(&test_delegate_));
diff --git a/chrome/browser/notifications/notifications_interactive_uitest.cc b/chrome/browser/notifications/notifications_interactive_uitest.cc
index d8e4b27..55d4a82 100644
--- a/chrome/browser/notifications/notifications_interactive_uitest.cc
+++ b/chrome/browser/notifications/notifications_interactive_uitest.cc
@@ -20,8 +20,7 @@ class NotificationsPermissionTest : public UITest {
TEST_F(NotificationsPermissionTest, TestUserGestureInfobar) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get() != NULL);
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
@@ -47,8 +46,7 @@ TEST_F(NotificationsPermissionTest, TestUserGestureInfobar) {
TEST_F(NotificationsPermissionTest, TestNoUserGestureInfobar) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get() != NULL);
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index 2392dd6..f559c33 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -292,8 +292,7 @@ TEST_F(PrintingLayoutTextTest, FAILS_Complex) {
"close_printdlg_thread");
// Print a document, check its output.
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
NavigateToURL(server->TestServerPage("files/printing/test1.html"));
@@ -324,8 +323,7 @@ TEST_F(PrintingLayoutTestHidden, DISABLED_ManyTimes) {
if (IsTestCaseDisabled())
return;
- scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
DismissTheWindow dismisser(base::GetProcId(process()));
@@ -375,8 +373,7 @@ TEST_F(PrintingLayoutTest, DISABLED_Delayed) {
if (IsTestCaseDisabled())
return;
- scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
{
@@ -410,8 +407,7 @@ TEST_F(PrintingLayoutTest, DISABLED_IFrame) {
if (IsTestCaseDisabled())
return;
- scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
{
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
index fa022db..dcf7b1e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
@@ -79,8 +79,7 @@ TEST_F(ResourceDispatcherTest, ContentDispositionInline) {
// Test for bug #1091358.
TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
@@ -101,8 +100,7 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest) {
TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_Disallowed) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
@@ -126,8 +124,7 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_Disallowed) {
// if executed while navigating to a new page.
TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_DuringUnload) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
@@ -163,8 +160,7 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_DuringUnload) {
// Tests that onunload is run for cross-site requests. (Bug 1114994)
TEST_F(ResourceDispatcherTest, CrossSiteOnunloadCookie) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
@@ -258,8 +254,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationNonBuffered) {
// away from the link doctor page. (Bug 1235537)
TEST_F(ResourceDispatcherTest, CrossSiteNavigationErrorPage) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
diff --git a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
index 0dd81be..a98ff5a 100644
--- a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
@@ -33,7 +33,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Start two servers with different sites.
const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> http_server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ HTTPTestServer::CreateServer(kDocRoot);
scoped_refptr<HTTPSTestServer> https_server =
HTTPSTestServer::CreateGoodServer(kDocRoot);
@@ -76,7 +76,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Start two servers with different sites.
const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> http_server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ HTTPTestServer::CreateServer(kDocRoot);
scoped_refptr<HTTPSTestServer> https_server =
HTTPSTestServer::CreateGoodServer(kDocRoot);
@@ -119,7 +119,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Start two servers with different sites.
const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> http_server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ HTTPTestServer::CreateServer(kDocRoot);
scoped_refptr<HTTPSTestServer> https_server =
HTTPSTestServer::CreateGoodServer(kDocRoot);
diff --git a/chrome/browser/repost_form_warning_uitest.cc b/chrome/browser/repost_form_warning_uitest.cc
index 46e43cb..d5fef12 100644
--- a/chrome/browser/repost_form_warning_uitest.cc
+++ b/chrome/browser/repost_form_warning_uitest.cc
@@ -29,8 +29,7 @@ typedef UITest RepostFormWarningTest;
#endif
TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
@@ -60,8 +59,7 @@ TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) {
#endif
TEST_F(RepostFormWarningTest, MAYBE_TestLoginAfterRepost) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc
index a449437..368ad0b 100644
--- a/chrome/browser/session_history_uitest.cc
+++ b/chrome/browser/session_history_uitest.cc
@@ -81,8 +81,7 @@ class SessionHistoryTest : public UITest {
};
TEST_F(SessionHistoryTest, BasicBackForward) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -148,8 +147,7 @@ TEST_F(SessionHistoryTest, BasicBackForward) {
#define MAYBE_FrameBackForward FrameBackForward
#endif
TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -214,8 +212,7 @@ TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) {
// Test that back/forward preserves POST data and document state in subframes.
TEST_F(SessionHistoryTest, FrameFormBackForward) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -276,8 +273,7 @@ TEST_F(SessionHistoryTest, FrameFormBackForward) {
// across frames (ie, from frame -> nonframe).
// Hangs, see http://crbug.com/45058.
TEST_F(SessionHistoryTest, DISABLED_CrossFrameFormBackForward) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -322,8 +318,7 @@ TEST_F(SessionHistoryTest, DISABLED_CrossFrameFormBackForward) {
// Test that back/forward entries are created for reference fragment
// navigations. Bug 730379.
TEST_F(SessionHistoryTest, FragmentBackForward) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -392,8 +387,7 @@ TEST_F(SessionHistoryTest, FragmentBackForward) {
// means the test will hang if it attempts to navigate too far forward or back,
// since we'll be waiting forever for a load stop event.
TEST_F(SessionHistoryTest, JavascriptHistory) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// about:blank should be loaded first.
@@ -476,8 +470,7 @@ TEST_F(SessionHistoryTest, JavascriptHistory) {
TEST_F(SessionHistoryTest, FAILS_LocationReplace) {
// Test that using location.replace doesn't leave the title of the old page
// visible.
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage(
@@ -503,8 +496,7 @@ TEST_F(SessionHistoryTest, FLAKY_HistorySearchXSS) {
}
TEST_F(SessionHistoryTest, LocationChangeInSubframe) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get());
ASSERT_TRUE(tab_->NavigateToURL(server->TestServerPage(
@@ -524,8 +516,7 @@ TEST_F(SessionHistoryTest, LocationChangeInSubframe) {
#define HistoryLength DISABLED_HistoryLength
#endif // defined(OS_WIN)
TEST_F(SessionHistoryTest, HistoryLength) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get());
int length;
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc
index c5e5632..64ccddc 100644
--- a/chrome/browser/sessions/session_restore_uitest.cc
+++ b/chrome/browser/sessions/session_restore_uitest.cc
@@ -145,8 +145,7 @@ TEST_F(SessionRestoreUITest, RestoresForwardAndBackwardNavs) {
// cross-site page and then forward again works. (Bug 1204135)
TEST_F(SessionRestoreUITest, RestoresCrossSiteForwardAndBackwardNavs) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL cross_site_url(server->TestServerPage("files/title2.html"));
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 10a1200..a0d2279 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -22,7 +22,7 @@ class SSLUITest : public InProcessBrowserTest {
}
scoped_refptr<HTTPTestServer> PlainServer() {
- return HTTPTestServer::CreateServer(kDocRoot, NULL);
+ return HTTPTestServer::CreateServer(kDocRoot);
}
scoped_refptr<HTTPSTestServer> GoodCertServer() {
diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc
index 8c28d16..7eeb7fd 100644
--- a/chrome/browser/sync/glue/http_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/http_bridge_unittest.cc
@@ -174,8 +174,7 @@ TEST_F(HttpBridgeTest, TestMakeSynchronousPostShunted) {
// Full round-trip test of the HttpBridge, using default UA string and
// no request cookies.
TEST_F(HttpBridgeTest, TestMakeSynchronousPostLiveWithPayload) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<HttpBridge> http_bridge(BuildBridge());
@@ -199,8 +198,7 @@ TEST_F(HttpBridgeTest, TestMakeSynchronousPostLiveWithPayload) {
// Full round-trip test of the HttpBridge, using custom UA string
TEST_F(HttpBridgeTest, TestMakeSynchronousPostLiveComprehensive) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<HttpBridge> http_bridge(BuildBridge());
@@ -227,8 +225,7 @@ TEST_F(HttpBridgeTest, TestMakeSynchronousPostLiveComprehensive) {
}
TEST_F(HttpBridgeTest, TestExtraRequestHeaders) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<HttpBridge> http_bridge(BuildBridge());
@@ -256,8 +253,7 @@ TEST_F(HttpBridgeTest, TestExtraRequestHeaders) {
}
TEST_F(HttpBridgeTest, TestResponseHeader) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<HttpBridge> http_bridge(BuildBridge());
diff --git a/chrome/browser/tab_contents/view_source_uitest.cc b/chrome/browser/tab_contents/view_source_uitest.cc
index e58a906..34ba3ae 100644
--- a/chrome/browser/tab_contents/view_source_uitest.cc
+++ b/chrome/browser/tab_contents/view_source_uitest.cc
@@ -37,8 +37,7 @@ class ViewSourceTest : public UITest {
// set in the html was set successfully (it shouldn't because we rendered the
// page in view source)
TEST_F(ViewSourceTest, DoesBrowserRenderInViewSource) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
std::string cookie = "viewsource_cookie";
std::string cookie_data = "foo";
@@ -62,8 +61,7 @@ TEST_F(ViewSourceTest, DoesBrowserRenderInViewSource) {
// implementation of the view-source: prefix being consumed (removed from the
// URL) if the URL was not changed (apart from adding the view-source prefix)
TEST_F(ViewSourceTest, DoesBrowserConsumeViewSourcePrefix) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// First we navigate to google.html.
@@ -82,8 +80,7 @@ TEST_F(ViewSourceTest, DoesBrowserConsumeViewSourcePrefix) {
// Make sure that when looking at the actual page, we can select "View Source"
// from the menu.
TEST_F(ViewSourceTest, ViewSourceInMenuEnabledOnANormalPage) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url(server->TestServerPage(test_html_));
@@ -95,8 +92,7 @@ TEST_F(ViewSourceTest, ViewSourceInMenuEnabledOnANormalPage) {
// Make sure that when looking at the page source, we can't select "View Source"
// from the menu.
TEST_F(ViewSourceTest, ViewSourceInMenuDisabledWhileViewingSource) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url_viewsource(chrome::kViewSourceScheme + std::string(":") +
diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc
index ac655ea..009d780 100644
--- a/chrome/browser/tab_restore_uitest.cc
+++ b/chrome/browser/tab_restore_uitest.cc
@@ -459,8 +459,7 @@ TEST_F(TabRestoreUITest, FLAKY_RestoreIntoSameWindow) {
// to an existing SiteInstance. (Bug 1230446)
TEST_F(TabRestoreUITest, RestoreWithExistingSiteInstance) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL http_url1(server->TestServerPage("files/title1.html"));
GURL http_url2(server->TestServerPage("files/title2.html"));
@@ -506,8 +505,7 @@ TEST_F(TabRestoreUITest, RestoreWithExistingSiteInstance) {
// already exists. (Bug 1204135)
TEST_F(TabRestoreUITest, RestoreCrossSiteWithExistingSiteInstance) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL http_url1(server->TestServerPage("files/title1.html"));
GURL http_url2(server->TestServerPage("files/title2.html"));
@@ -648,8 +646,7 @@ TEST_F(TabRestoreUITest, RestoreTabWithSpecialURL) {
// entry and see that it loads properly. See http://crbug.com/31905
TEST_F(TabRestoreUITest, RestoreTabWithSpecialURLOnBack) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get());
const GURL http_url(server->TestServerPage("files/title1.html"));
diff --git a/chrome/browser/views/find_bar_host_interactive_uitest.cc b/chrome/browser/views/find_bar_host_interactive_uitest.cc
index 51080bf..82e0987 100644
--- a/chrome/browser/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/views/find_bar_host_interactive_uitest.cc
@@ -87,8 +87,7 @@ class FindInPageTest : public InProcessBrowserTest {
} // namespace
IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
// First we navigate to our test page (tab A).
@@ -125,8 +124,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) {
}
IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestore) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = server->TestServerPage("title1.html");
diff --git a/chrome/browser/views/find_bar_host_uitest.cc b/chrome/browser/views/find_bar_host_uitest.cc
index fa54871..6b09cc8 100644
--- a/chrome/browser/views/find_bar_host_uitest.cc
+++ b/chrome/browser/views/find_bar_host_uitest.cc
@@ -26,7 +26,7 @@ const std::string kSimplePage = "404_is_enough_for_us.html";
// a new tab.
TEST_F(FindInPageControllerTest, FindMovesOnTabClose_Issue1343052) {
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ HTTPTestServer::CreateServer(L"chrome/test/data");
ASSERT_TRUE(NULL != server.get());
GURL url = server->TestServerPage(kSimplePage);
diff --git a/chrome/common/net/url_fetcher_unittest.cc b/chrome/common/net/url_fetcher_unittest.cc
index 5e39c2a..4b5586a 100644
--- a/chrome/common/net/url_fetcher_unittest.cc
+++ b/chrome/common/net/url_fetcher_unittest.cc
@@ -431,22 +431,21 @@ void URLFetcherCancelTest::CancelRequest() {
}
TEST_F(URLFetcherTest, SameThreadsTest) {
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
+ ASSERT_TRUE(NULL != server.get());
+
// Create the fetcher on the main thread. Since IO will happen on the main
// thread, this will test URLFetcher's ability to do everything on one
// thread.
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
- ASSERT_TRUE(NULL != server.get());
-
CreateFetcher(GURL(server->TestServerPage("defaultresponse")));
MessageLoop::current()->Run();
}
TEST_F(URLFetcherTest, DifferentThreadsTest) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
+
// Create a separate thread that will create the URLFetcher. The current
// (main) thread will do the IO, and when the fetch is complete it will
// terminate the main thread's message loop; then the other thread's
@@ -461,8 +460,7 @@ TEST_F(URLFetcherTest, DifferentThreadsTest) {
}
TEST_F(URLFetcherPostTest, Basic) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
CreateFetcher(GURL(server->TestServerPage("echo")));
MessageLoop::current()->Run();
@@ -470,7 +468,7 @@ TEST_F(URLFetcherPostTest, Basic) {
TEST_F(URLFetcherHeadersTest, Headers) {
scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"net/data/url_request_unittest", NULL);
+ HTTPTestServer::CreateServer(L"net/data/url_request_unittest");
ASSERT_TRUE(NULL != server.get());
CreateFetcher(GURL(server->TestServerPage("files/with-headers.html")));
MessageLoop::current()->Run();
@@ -478,8 +476,7 @@ TEST_F(URLFetcherHeadersTest, Headers) {
}
TEST_F(URLFetcherProtectTest, Overload) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = GURL(server->TestServerPage("defaultresponse"));
@@ -496,8 +493,7 @@ TEST_F(URLFetcherProtectTest, Overload) {
}
TEST_F(URLFetcherProtectTest, ServerUnavailable) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = GURL(server->TestServerPage("files/server-unavailable.html"));
@@ -516,8 +512,7 @@ TEST_F(URLFetcherProtectTest, ServerUnavailable) {
}
TEST_F(URLFetcherProtectTestPassedThrough, ServerUnavailablePropagateResponse) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = GURL(server->TestServerPage("files/server-unavailable.html"));
@@ -549,8 +544,7 @@ TEST_F(URLFetcherBadHTTPSTest, BadHTTPSTest) {
}
TEST_F(URLFetcherCancelTest, ReleasesContext) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = GURL(server->TestServerPage("files/server-unavailable.html"));
@@ -576,8 +570,7 @@ TEST_F(URLFetcherCancelTest, ReleasesContext) {
}
TEST_F(URLFetcherCancelTest, CancelWhileDelayedStartTaskPending) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
GURL url = GURL(server->TestServerPage("files/server-unavailable.html"));
diff --git a/chrome/renderer/external_extension_uitest.cc b/chrome/renderer/external_extension_uitest.cc
index 2bc7f54e..d883c2e 100644
--- a/chrome/renderer/external_extension_uitest.cc
+++ b/chrome/renderer/external_extension_uitest.cc
@@ -28,7 +28,7 @@ class SearchProviderTest : public UITest {
};
SearchProviderTest::SearchProviderTest()
- : server_(HTTPTestServer::CreateServer(L"chrome/test/data", NULL)) {
+ : server_(HTTPTestServer::CreateServer(L"chrome/test/data")) {
if (!server_)
return;
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index bace790..d6911a4 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -972,8 +972,7 @@ TEST_F(ExternalTabUITest, FLAKY_TabPostMessage) {
TEST_F(ExternalTabUITest, FLAKY_PostMessageTarget) {
const wchar_t kDocRoot[] = L"chrome/test/data/external_tab";
- scoped_refptr<HTTPTestServer> server(
- HTTPTestServer::CreateServer(kDocRoot, NULL));
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_THAT(server.get(), testing::NotNull());
scoped_refptr<TabProxy> tab;
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 438a34c..f2c410d 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -239,11 +239,9 @@ void InProcessBrowserTest::TearDown() {
}
HTTPTestServer* InProcessBrowserTest::StartHTTPServer() {
- // The HTTPServer must run on the IO thread.
DCHECK(!http_server_.get());
http_server_ = HTTPTestServer::CreateServer(
- L"chrome/test/data",
- g_browser_process->io_thread()->message_loop());
+ L"chrome/test/data");
return http_server_.get();
}
diff --git a/chrome/test/interactive_ui/infobars_uitest.cc b/chrome/test/interactive_ui/infobars_uitest.cc
index 9968c03..a31513c 100644
--- a/chrome/test/interactive_ui/infobars_uitest.cc
+++ b/chrome/test/interactive_ui/infobars_uitest.cc
@@ -17,8 +17,7 @@ class InfoBarsUITest : public UITest {
TEST_F(InfoBarsUITest, TestInfoBarsCloseOnNewTheme) {
const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server.get() != NULL);
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
diff --git a/chrome/test/ui/ppapi_uitest.cc b/chrome/test/ui/ppapi_uitest.cc
index ce37d97..abf74c4 100644
--- a/chrome/test/ui/ppapi_uitest.cc
+++ b/chrome/test/ui/ppapi_uitest.cc
@@ -74,8 +74,8 @@ class PPAPITest : public UITest {
void RunTestViaHTTP(const std::string& test_case) {
const wchar_t kDocRoot[] = L"third_party/ppapi/tests";
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateForkingServer(kDocRoot);
+ scoped_refptr<HTTPTestServer> server(
+ HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(server);
RunTestURL(server->TestServerPage("files/test_case.html?" + test_case));
}
diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc
index ab1f734..5d2004e 100644
--- a/chrome/worker/worker_uitest.cc
+++ b/chrome/worker/worker_uitest.cc
@@ -198,8 +198,7 @@ const wchar_t kDocRoot[] = L"chrome/test/data/workers";
#endif
// Make sure that auth dialog is displayed from worker context.
TEST_F(WorkerTest, WorkerHttpAuth) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
@@ -216,8 +215,7 @@ TEST_F(WorkerTest, WorkerHttpAuth) {
#endif
// Make sure that auth dialog is displayed from shared worker context.
TEST_F(WorkerTest, SharedWorkerHttpAuth) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot, NULL);
+ scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot));
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());