From e70c6a8ce0d7a9e426c7247f5b771bed1b9eae4a Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Fri, 23 Jul 2010 20:38:56 +0000 Subject: GTTF: test server cleanup: - simplify the public interface - remove unneeded methods - make it easier to understand TEST=none BUG=49680 Review URL: http://codereview.chromium.org/2881028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53509 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/session_history_uitest.cc | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'chrome/browser/session_history_uitest.cc') 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr 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 server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(server.get()); int length; -- cgit v1.1