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

Unified Diff: chrome/browser/interstitial_page_uitest.cc

Issue 16490: Add FTP unit test in preparation for portable FTP implementation.... (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/history/redirect_uitest.cc ('k') | chrome/browser/login_prompt_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/interstitial_page_uitest.cc
===================================================================
--- chrome/browser/interstitial_page_uitest.cc (revision 7499)
+++ chrome/browser/interstitial_page_uitest.cc (working copy)
@@ -52,10 +52,13 @@
// causes the actual navigation entry (title) to be modified by the content of
// the interstitial.
TEST_F(InterstitialPageTest, TestShowHideInterstitial) {
- TestServer server(kDocRoot);
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(kDocRoot);
+ ASSERT_TRUE(NULL != server.get());
+
::scoped_ptr<TabProxy> tab(GetActiveTabProxy());
NavigateTab(tab.get(),
- server.TestServerPageW(L"files/interstitial_page/google.html"));
+ server->TestServerPageW(L"files/interstitial_page/google.html"));
NavigationEntry::PageType page_type;
EXPECT_TRUE(tab->GetPageType(&page_type));
EXPECT_EQ(NavigationEntry::NORMAL_PAGE, page_type);
@@ -78,10 +81,13 @@
// the interstitial. In the mean time, we are treating Back like cancelling
// the interstitial, which breaks this test because no notification occurs.
TEST_F(InterstitialPageTest, DISABLED_TestShowInterstitialThenBack) {
- TestServer server(kDocRoot);
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(kDocRoot);
+ ASSERT_TRUE(NULL != server.get());
+
::scoped_ptr<TabProxy> tab(GetActiveTabProxy());
NavigateTab(tab.get(),
- server.TestServerPageW(L"files/interstitial_page/google.html"));
+ server->TestServerPageW(L"files/interstitial_page/google.html"));
EXPECT_EQ(L"Google", GetActiveTabTitle());
tab->ShowInterstitialPage(kInterstitialPageHTMLText, action_timeout_ms());
@@ -94,26 +100,31 @@
// Shows an interstitial page then navigates to a new URL.
// Flacky on Windows 2000 bot. Disabled for now bug #1173138.
TEST_F(InterstitialPageTest, DISABLED_TestShowInterstitialThenNavigate) {
- TestServer server(kDocRoot);
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(kDocRoot);
+ ASSERT_TRUE(NULL != server.get());
+
::scoped_ptr<TabProxy> tab(GetActiveTabProxy());
NavigateTab(tab.get(),
- server.TestServerPageW(L"files/interstitial_page/google.html"));
+ server->TestServerPageW(L"files/interstitial_page/google.html"));
EXPECT_EQ(L"Google", GetActiveTabTitle());
tab->ShowInterstitialPage(kInterstitialPageHTMLText, action_timeout_ms());
EXPECT_EQ(L"Interstitial page", GetActiveTabTitle());
tab->NavigateToURL(
- server.TestServerPageW(L"files/interstitial_page/shopping.html"));
+ server->TestServerPageW(L"files/interstitial_page/shopping.html"));
EXPECT_EQ(L"Google Product Search", GetActiveTabTitle());
}
// Shows an interstitial page then closes the tab (to make sure we don't crash).
TEST_F(InterstitialPageTest, TestShowInterstitialThenCloseTab) {
- TestServer server(kDocRoot);
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(kDocRoot);
+ ASSERT_TRUE(NULL != server.get());
// Create 2 tabs so closing one does not close the browser.
- AppendTab(server.TestServerPageW(L"files/interstitial_page/google.html"));
+ AppendTab(server->TestServerPageW(L"files/interstitial_page/google.html"));
::scoped_ptr<TabProxy> tab(GetActiveTabProxy());
EXPECT_EQ(L"Google", GetActiveTabTitle());
@@ -126,11 +137,13 @@
// crash).
// This test is disabled. See bug #1119448.
TEST_F(InterstitialPageTest, DISABLED_TestShowInterstitialThenCloseBrowser) {
- TestServer server(kDocRoot);
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(kDocRoot);
+ ASSERT_TRUE(NULL != server.get());
::scoped_ptr<TabProxy> tab(GetActiveTabProxy());
tab->NavigateToURL(
- server.TestServerPageW(L"files/interstitial_page/google.html"));
+ server->TestServerPageW(L"files/interstitial_page/google.html"));
EXPECT_EQ(L"Google", GetActiveTabTitle());
tab->ShowInterstitialPage(kInterstitialPageHTMLText, action_timeout_ms());
« no previous file with comments | « chrome/browser/history/redirect_uitest.cc ('k') | chrome/browser/login_prompt_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698