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

Unified Diff: chrome/browser/view_source_uitest.cc

Issue 17030: Revert 7508.7509 and 7510 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
« no previous file with comments | « chrome/browser/url_fetcher_unittest.cc ('k') | chrome/browser/views/find_bar_win_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/view_source_uitest.cc
===================================================================
--- chrome/browser/view_source_uitest.cc (revision 7513)
+++ chrome/browser/view_source_uitest.cc (working copy)
@@ -38,14 +38,12 @@
// 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);
- ASSERT_TRUE(NULL != server.get());
+ TestServer server(kDocRoot);
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);
@@ -63,12 +61,10 @@
// 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);
- ASSERT_TRUE(NULL != server.get());
+ TestServer server(kDocRoot);
// 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
@@ -82,12 +78,10 @@
// Make sure that when looking at the actual page, we can select
// "View Source" from the Page menu.
TEST_F(ViewSourceTest, ViewSourceInPageMenuEnabledOnANormalPage) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot);
- ASSERT_TRUE(NULL != server.get());
+ TestServer server(kDocRoot);
// 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));
@@ -96,12 +90,10 @@
// Make sure that when looking at the page source, we can't select
// "View Source" from the Page menu.
TEST_F(ViewSourceTest, ViewSourceInPageMenuDisabledWhileViewingSource) {
- scoped_refptr<HTTPTestServer> server =
- HTTPTestServer::CreateServer(kDocRoot);
- ASSERT_TRUE(NULL != server.get());
+ TestServer server(kDocRoot);
// 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);
« no previous file with comments | « chrome/browser/url_fetcher_unittest.cc ('k') | chrome/browser/views/find_bar_win_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698