diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 20:38:56 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 20:38:56 +0000 |
commit | e70c6a8ce0d7a9e426c7247f5b771bed1b9eae4a (patch) | |
tree | fa50ca32a7fc32fd0adb7d1aebdb96a84e0477eb /chrome/browser/session_history_uitest.cc | |
parent | f324cce9f59858e24b59258271d186f84c3f3f1a (diff) | |
download | chromium_src-e70c6a8ce0d7a9e426c7247f5b771bed1b9eae4a.zip chromium_src-e70c6a8ce0d7a9e426c7247f5b771bed1b9eae4a.tar.gz chromium_src-e70c6a8ce0d7a9e426c7247f5b771bed1b9eae4a.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/session_history_uitest.cc')
-rw-r--r-- | chrome/browser/session_history_uitest.cc | 27 |
1 files changed, 9 insertions, 18 deletions
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; |