| Index: chrome/browser/view_source_uitest.cc
|
| ===================================================================
|
| --- chrome/browser/view_source_uitest.cc (revision 7499)
|
| +++ chrome/browser/view_source_uitest.cc (working copy)
|
| @@ -38,12 +38,14 @@
|
| // set in the html was set successfully (it shouldn't because we rendered the
|
| // page in view source)
|
| TEST_F(ViewSourceTest, DoesBrowserRenderInViewSource) {
|
| - TestServer server(kDocRoot);
|
| + scoped_refptr<HTTPTestServer> server =
|
| + HTTPTestServer::CreateServer(kDocRoot);
|
| + ASSERT_TRUE(NULL != server.get());
|
| std::string cookie = "viewsource_cookie";
|
| std::string cookie_data = "foo";
|
|
|
| // First we navigate to our view-source test page
|
| - GURL url = server.TestServerPageW(test_html_);
|
| + GURL url = server->TestServerPageW(test_html_);
|
| url = GURL("view-source:" + url.spec());
|
| scoped_ptr<TabProxy> tab(GetActiveTab());
|
| tab->NavigateToURL(url);
|
| @@ -61,10 +63,12 @@
|
| // 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) {
|
| - TestServer server(kDocRoot);
|
| + scoped_refptr<HTTPTestServer> server =
|
| + HTTPTestServer::CreateServer(kDocRoot);
|
| + ASSERT_TRUE(NULL != server.get());
|
|
|
| // First we navigate to google.html
|
| - GURL url = server.TestServerPageW(test_html_);
|
| + GURL url = server->TestServerPageW(test_html_);
|
| NavigateToURL(url);
|
|
|
| // Then we navigate to the SAME url but with the view-source: prefix
|
| @@ -78,10 +82,12 @@
|
| // Make sure that when looking at the actual page, we can select
|
| // "View Source" from the Page menu.
|
| TEST_F(ViewSourceTest, ViewSourceInPageMenuEnabledOnANormalPage) {
|
| - TestServer server(kDocRoot);
|
| + scoped_refptr<HTTPTestServer> server =
|
| + HTTPTestServer::CreateServer(kDocRoot);
|
| + ASSERT_TRUE(NULL != server.get());
|
|
|
| // First we navigate to google.html
|
| - GURL url = server.TestServerPageW(test_html_);
|
| + GURL url = server->TestServerPageW(test_html_);
|
| NavigateToURL(url);
|
|
|
| EXPECT_TRUE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE));
|
| @@ -90,10 +96,12 @@
|
| // Make sure that when looking at the page source, we can't select
|
| // "View Source" from the Page menu.
|
| TEST_F(ViewSourceTest, ViewSourceInPageMenuDisabledWhileViewingSource) {
|
| - TestServer server(kDocRoot);
|
| + scoped_refptr<HTTPTestServer> server =
|
| + HTTPTestServer::CreateServer(kDocRoot);
|
| + ASSERT_TRUE(NULL != server.get());
|
|
|
| // First we navigate to google.html
|
| - GURL url = server.TestServerPageW(test_html_);
|
| + GURL url = server->TestServerPageW(test_html_);
|
| GURL url_viewsource = GURL("view-source:" + url.spec());
|
| NavigateToURL(url_viewsource);
|
|
|
|
|