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

Unified Diff: net/base/sdch_dictionary_fetcher_unittest.cc

Issue 647883002: git cl format the final third of the net/base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/base/sdch_dictionary_fetcher_unittest.cc
diff --git a/net/base/sdch_dictionary_fetcher_unittest.cc b/net/base/sdch_dictionary_fetcher_unittest.cc
index a8b3040d7cdd792927c65f4b17928e199ad0c947..12fe595e24f819772af430e47b3ae97256416be2 100644
--- a/net/base/sdch_dictionary_fetcher_unittest.cc
+++ b/net/base/sdch_dictionary_fetcher_unittest.cc
@@ -31,8 +31,8 @@ class URLRequestSpecifiedResponseJob : public URLRequestSimpleJob {
static void AddUrlHandler() {
net::URLRequestFilter* filter = net::URLRequestFilter::GetInstance();
jobs_requested_ = 0;
- filter->AddHostnameHandler("http", kTestDomain,
- &URLRequestSpecifiedResponseJob::Factory);
+ filter->AddHostnameHandler(
+ "http", kTestDomain, &URLRequestSpecifiedResponseJob::Factory);
}
static void RemoveUrlHandler() {
@@ -41,24 +41,24 @@ class URLRequestSpecifiedResponseJob : public URLRequestSimpleJob {
jobs_requested_ = 0;
}
- static URLRequestJob* Factory(
- URLRequest* request,
- net::NetworkDelegate* network_delegate,
- const std::string& scheme) {
+ static URLRequestJob* Factory(URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const std::string& scheme) {
++jobs_requested_;
return new URLRequestSpecifiedResponseJob(request, network_delegate);
}
static std::string ExpectedResponseForURL(const GURL& url) {
return base::StringPrintf("Response for %s\n%s\nEnd Response for %s\n",
- url.spec().c_str(), kSampleBufferContext,
+ url.spec().c_str(),
+ kSampleBufferContext,
url.spec().c_str());
}
static int jobs_requested() { return jobs_requested_; }
private:
- virtual ~URLRequestSpecifiedResponseJob() {};
+ virtual ~URLRequestSpecifiedResponseJob(){};
virtual int GetData(std::string* mime_type,
std::string* charset,
std::string* data,
@@ -78,9 +78,7 @@ class SdchTestDelegate : public SdchFetcher::Delegate {
struct DictionaryAdditions {
DictionaryAdditions(const std::string& dictionary_text,
const GURL& dictionary_url)
- : dictionary_text(dictionary_text),
- dictionary_url(dictionary_url) {}
-
+ : dictionary_text(dictionary_text), dictionary_url(dictionary_url) {}
std::string dictionary_text;
GURL dictionary_url;
@@ -111,8 +109,8 @@ class SdchDictionaryFetcherTest : public ::testing::Test {
URLRequestSpecifiedResponseJob::AddUrlHandler();
fetcher_delegate_.reset(new SdchTestDelegate);
context_.reset(new TestURLRequestContext);
- fetcher_.reset(new SdchDictionaryFetcher(
- fetcher_delegate_.get(), context_.get()));
+ fetcher_.reset(
+ new SdchDictionaryFetcher(fetcher_delegate_.get(), context_.get()));
}
virtual void TearDown() override {
@@ -154,8 +152,9 @@ TEST_F(SdchDictionaryFetcherTest, Basic) {
std::vector<SdchTestDelegate::DictionaryAdditions> additions;
manager()->GetDictionaryAdditions(&additions);
ASSERT_EQ(1u, additions.size());
- EXPECT_EQ(URLRequestSpecifiedResponseJob::ExpectedResponseForURL(
- dictionary_url), additions[0].dictionary_text);
+ EXPECT_EQ(
+ URLRequestSpecifiedResponseJob::ExpectedResponseForURL(dictionary_url),
+ additions[0].dictionary_text);
}
// Multiple fetches of the same URL should result in only one request.
@@ -170,8 +169,9 @@ TEST_F(SdchDictionaryFetcherTest, Multiple) {
std::vector<SdchTestDelegate::DictionaryAdditions> additions;
manager()->GetDictionaryAdditions(&additions);
ASSERT_EQ(1u, additions.size());
- EXPECT_EQ(URLRequestSpecifiedResponseJob::ExpectedResponseForURL(
- dictionary_url), additions[0].dictionary_text);
+ EXPECT_EQ(
+ URLRequestSpecifiedResponseJob::ExpectedResponseForURL(dictionary_url),
+ additions[0].dictionary_text);
}
// A cancel should result in no actual requests being generated.
@@ -189,5 +189,4 @@ TEST_F(SdchDictionaryFetcherTest, Cancel) {
// Synchronous execution may have resulted in a single job being scheduled.
EXPECT_GE(1, JobsRequested());
}
-
}

Powered by Google App Engine
This is Rietveld 408576698