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

Unified Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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
Index: net/proxy/proxy_script_fetcher_impl_unittest.cc
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index 53f76556e24b1f8f27b8ae8a1461e3d5b863ac28..8a3eb035e9b54abd6d50d84ccb1e96f8fd406a8e 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -78,8 +78,7 @@ class RequestContext : public URLRequestContext {
storage_.set_job_factory(job_factory);
}
- virtual ~RequestContext() {
- }
+ virtual ~RequestContext() {}
private:
URLRequestContextStorage storage_;
@@ -202,20 +201,20 @@ class ProxyScriptFetcherImplTest : public PlatformTest {
TEST_F(ProxyScriptFetcherImplTest, FileUrl) {
ProxyScriptFetcherImpl pac_fetcher(&context_);
- { // Fetch a non-existent file.
+ { // Fetch a non-existent file.
base::string16 text;
TestCompletionCallback callback;
- int result = pac_fetcher.Fetch(GetTestFileUrl("does-not-exist"),
- &text, callback.callback());
+ int result = pac_fetcher.Fetch(
+ GetTestFileUrl("does-not-exist"), &text, callback.callback());
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(ERR_FILE_NOT_FOUND, callback.WaitForResult());
EXPECT_TRUE(text.empty());
}
- { // Fetch a file that exists.
+ { // Fetch a file that exists.
base::string16 text;
TestCompletionCallback callback;
- int result = pac_fetcher.Fetch(GetTestFileUrl("pac.txt"),
- &text, callback.callback());
+ int result = pac_fetcher.Fetch(
+ GetTestFileUrl("pac.txt"), &text, callback.callback());
EXPECT_EQ(ERR_IO_PENDING, result);
EXPECT_EQ(OK, callback.WaitForResult());
EXPECT_EQ(ASCIIToUTF16("-pac.txt-\n"), text);
@@ -229,7 +228,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
ProxyScriptFetcherImpl pac_fetcher(&context_);
- { // Fetch a PAC with mime type "text/plain"
+ { // Fetch a PAC with mime type "text/plain"
GURL url(test_server_.GetURL("files/pac.txt"));
base::string16 text;
TestCompletionCallback callback;
@@ -238,7 +237,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
EXPECT_EQ(OK, callback.WaitForResult());
EXPECT_EQ(ASCIIToUTF16("-pac.txt-\n"), text);
}
- { // Fetch a PAC with mime type "text/html"
+ { // Fetch a PAC with mime type "text/html"
GURL url(test_server_.GetURL("files/pac.html"));
base::string16 text;
TestCompletionCallback callback;
@@ -247,7 +246,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpMimeType) {
EXPECT_EQ(OK, callback.WaitForResult());
EXPECT_EQ(ASCIIToUTF16("-pac.html-\n"), text);
}
- { // Fetch a PAC with mime type "application/x-ns-proxy-autoconfig"
+ { // Fetch a PAC with mime type "application/x-ns-proxy-autoconfig"
GURL url(test_server_.GetURL("files/pac.nsproxy"));
base::string16 text;
TestCompletionCallback callback;
@@ -263,7 +262,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpStatusCode) {
ProxyScriptFetcherImpl pac_fetcher(&context_);
- { // Fetch a PAC which gives a 500 -- FAIL
+ { // Fetch a PAC which gives a 500 -- FAIL
GURL url(test_server_.GetURL("files/500.pac"));
base::string16 text;
TestCompletionCallback callback;
@@ -272,7 +271,7 @@ TEST_F(ProxyScriptFetcherImplTest, HttpStatusCode) {
EXPECT_EQ(ERR_PAC_STATUS_NOT_OK, callback.WaitForResult());
EXPECT_TRUE(text.empty());
}
- { // Fetch a PAC which gives a 404 -- FAIL
+ { // Fetch a PAC which gives a 404 -- FAIL
GURL url(test_server_.GetURL("files/404.pac"));
base::string16 text;
TestCompletionCallback callback;
@@ -342,10 +341,8 @@ TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
int prev_size = pac_fetcher.SetSizeConstraint(50);
// These two URLs are the same file, but are http:// vs file://
- GURL urls[] = {
- test_server_.GetURL("files/large-pac.nsproxy"),
- GetTestFileUrl("large-pac.nsproxy")
- };
+ GURL urls[] = {test_server_.GetURL("files/large-pac.nsproxy"),
+ GetTestFileUrl("large-pac.nsproxy")};
// Try fetching URLs that are 101 bytes large. We should abort the request
// after 50 bytes have been read, and fail with a too large error.
@@ -362,7 +359,7 @@ TEST_F(ProxyScriptFetcherImplTest, TooLarge) {
// Restore the original size bound.
pac_fetcher.SetSizeConstraint(prev_size);
- { // Make sure we can still fetch regular URLs.
+ { // Make sure we can still fetch regular URLs.
GURL url(test_server_.GetURL("files/pac.nsproxy"));
base::string16 text;
TestCompletionCallback callback;
@@ -379,8 +376,8 @@ TEST_F(ProxyScriptFetcherImplTest, Hang) {
ProxyScriptFetcherImpl pac_fetcher(&context_);
// Set the timeout period to 0.5 seconds.
- base::TimeDelta prev_timeout = pac_fetcher.SetTimeoutConstraint(
- base::TimeDelta::FromMilliseconds(500));
+ base::TimeDelta prev_timeout =
+ pac_fetcher.SetTimeoutConstraint(base::TimeDelta::FromMilliseconds(500));
// Try fetching a URL which takes 1.2 seconds. We should abort the request
// after 500 ms, and fail with a timeout error.
@@ -397,7 +394,7 @@ TEST_F(ProxyScriptFetcherImplTest, Hang) {
// Restore the original timeout period.
pac_fetcher.SetTimeoutConstraint(prev_timeout);
- { // Make sure we can still fetch regular URLs.
+ { // Make sure we can still fetch regular URLs.
GURL url(test_server_.GetURL("files/pac.nsproxy"));
base::string16 text;
TestCompletionCallback callback;

Powered by Google App Engine
This is Rietveld 408576698