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

Side by Side Diff: chrome/browser/net/http_pipelining_compatibility_client_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/http_pipelining_compatibility_client.h" 5 #include "chrome/browser/net/http_pipelining_compatibility_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 if (ContainsKey(original_samples_, name)) { 197 if (ContainsKey(original_samples_, name)) {
198 samples->Subtract(*(original_samples_[name])); 198 samples->Subtract(*(original_samples_[name]));
199 } 199 }
200 200
201 EXPECT_EQ(expected_count, samples->TotalCount()) << name; 201 EXPECT_EQ(expected_count, samples->TotalCount()) << name;
202 if (expected_count > 0) { 202 if (expected_count > 0) {
203 EXPECT_EQ(expected_count, samples->GetCount(expected_value)) << name; 203 EXPECT_EQ(expected_count, samples->GetCount(expected_value)) << name;
204 } 204 }
205 } 205 }
206 206
207 MessageLoopForIO message_loop_; 207 base::MessageLoopForIO message_loop_;
208 net::SpawnedTestServer test_server_; 208 net::SpawnedTestServer test_server_;
209 net::TestURLRequestContextGetter* context_; 209 net::TestURLRequestContextGetter* context_;
210 content::TestBrowserThread io_thread_; 210 content::TestBrowserThread io_thread_;
211 211
212 private: 212 private:
213 scoped_ptr<HistogramSamples> GetHistogram(const char* name) { 213 scoped_ptr<HistogramSamples> GetHistogram(const char* name) {
214 scoped_ptr<HistogramSamples> samples; 214 scoped_ptr<HistogramSamples> samples;
215 HistogramBase* cached_histogram = NULL; 215 HistogramBase* cached_histogram = NULL;
216 HistogramBase* current_histogram = 216 HistogramBase* current_histogram =
217 base::StatisticsRecorder::FindHistogram(name); 217 base::StatisticsRecorder::FindHistogram(name);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 callback.WaitForResult(); 588 callback.WaitForResult();
589 589
590 ExpectHistogramCount(1, false, FIELD_CANARY); 590 ExpectHistogramCount(1, false, FIELD_CANARY);
591 ExpectHistogramCount(0, false, FIELD_SUCCESS); 591 ExpectHistogramCount(0, false, FIELD_SUCCESS);
592 ExpectHistogramCount(0, true, FIELD_SUCCESS); 592 ExpectHistogramCount(0, true, FIELD_SUCCESS);
593 } 593 }
594 594
595 } // anonymous namespace 595 } // anonymous namespace
596 596
597 } // namespace chrome_browser_net 597 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_probe_service_unittest.cc ('k') | chrome/browser/net/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698