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 /net/proxy/proxy_script_fetcher_unittest.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 'net/proxy/proxy_script_fetcher_unittest.cc')
-rw-r--r-- | net/proxy/proxy_script_fetcher_unittest.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/net/proxy/proxy_script_fetcher_unittest.cc b/net/proxy/proxy_script_fetcher_unittest.cc index e0e64c9..d96da03 100644 --- a/net/proxy/proxy_script_fetcher_unittest.cc +++ b/net/proxy/proxy_script_fetcher_unittest.cc @@ -93,8 +93,7 @@ TEST_F(ProxyScriptFetcherTest, FileUrl) { // Note that all mime types are allowed for PAC file, to be consistent // with other browsers. TEST_F(ProxyScriptFetcherTest, HttpMimeType) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -130,8 +129,7 @@ TEST_F(ProxyScriptFetcherTest, HttpMimeType) { } TEST_F(ProxyScriptFetcherTest, HttpStatusCode) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -158,8 +156,7 @@ TEST_F(ProxyScriptFetcherTest, HttpStatusCode) { } TEST_F(ProxyScriptFetcherTest, ContentDisposition) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -177,8 +174,7 @@ TEST_F(ProxyScriptFetcherTest, ContentDisposition) { } TEST_F(ProxyScriptFetcherTest, NoCache) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -212,8 +208,7 @@ TEST_F(ProxyScriptFetcherTest, NoCache) { } TEST_F(ProxyScriptFetcherTest, TooLarge) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -255,8 +250,7 @@ TEST_F(ProxyScriptFetcherTest, TooLarge) { } TEST_F(ProxyScriptFetcherTest, Hang) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( @@ -295,8 +289,7 @@ TEST_F(ProxyScriptFetcherTest, Hang) { // (like gzip, bzip, etc.), and apply any charset conversions to yield // UTF8. TEST_F(ProxyScriptFetcherTest, Encodings) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot, NULL); + scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); ASSERT_TRUE(NULL != server.get()); scoped_refptr<URLRequestContext> context = new RequestContext; scoped_ptr<ProxyScriptFetcher> pac_fetcher( |