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/login_prompt_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/login_prompt_uitest.cc')
-rw-r--r-- | chrome/browser/login_prompt_uitest.cc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/chrome/browser/login_prompt_uitest.cc b/chrome/browser/login_prompt_uitest.cc index e1dc5af..e273fe6 100644 --- a/chrome/browser/login_prompt_uitest.cc +++ b/chrome/browser/login_prompt_uitest.cc @@ -51,8 +51,7 @@ wstring ExpectedTitleFromAuth(const wstring& username, // Test that "Basic" HTTP authentication works. TEST_F(LoginPromptTest, TestBasicAuth) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> tab(GetActiveTab()); ASSERT_TRUE(tab.get()); @@ -74,8 +73,7 @@ TEST_F(LoginPromptTest, TestBasicAuth) { // Test that "Digest" HTTP authentication works. TEST_F(LoginPromptTest, TestDigestAuth) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> tab(GetActiveTab()); ASSERT_TRUE(tab.get()); @@ -96,8 +94,7 @@ TEST_F(LoginPromptTest, TestDigestAuth) { // Test that logging in on 2 tabs at once works. TEST_F(LoginPromptTest, TestTwoAuths) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> basic_tab(GetActiveTab()); @@ -125,8 +122,7 @@ TEST_F(LoginPromptTest, TestTwoAuths) { // Test that cancelling authentication works. TEST_F(LoginPromptTest, TestCancelAuth) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> tab(GetActiveTab()); ASSERT_TRUE(tab.get()); @@ -165,8 +161,7 @@ TEST_F(LoginPromptTest, TestCancelAuth) { // If multiple tabs are looking for the same auth, the user should only have to // enter it once (http://crbug.com/8914). TEST_F(LoginPromptTest, SupplyRedundantAuths) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> basic_tab1(GetActiveTab()); @@ -200,8 +195,7 @@ TEST_F(LoginPromptTest, SupplyRedundantAuths) { // If multiple tabs are looking for the same auth, and one is cancelled, the // other should be cancelled as well. TEST_F(LoginPromptTest, CancelRedundantAuths) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<TabProxy> basic_tab1(GetActiveTab()); |