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

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

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const char* name = kHistogramNames[i]; 102 const char* name = kHistogramNames[i];
103 scoped_ptr<HistogramSamples> samples = GetHistogram(name); 103 scoped_ptr<HistogramSamples> samples = GetHistogram(name);
104 if (samples.get() && samples->TotalCount() > 0) { 104 if (samples.get() && samples->TotalCount() > 0) {
105 original_samples_[name] = samples.release(); 105 original_samples_[name] = samples.release();
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 virtual void TearDown() OVERRIDE { 110 virtual void TearDown() OVERRIDE {
111 BrowserThread::ReleaseSoon(BrowserThread::IO, FROM_HERE, context_); 111 BrowserThread::ReleaseSoon(BrowserThread::IO, FROM_HERE, context_);
112 message_loop_.RunAllPending(); 112 message_loop_.RunUntilIdle();
113 STLDeleteValues(&original_samples_); 113 STLDeleteValues(&original_samples_);
114 } 114 }
115 115
116 void RunTest( 116 void RunTest(
117 std::vector<RequestInfo> requests, 117 std::vector<RequestInfo> requests,
118 HttpPipeliningCompatibilityClient::Options options) { 118 HttpPipeliningCompatibilityClient::Options options) {
119 HttpPipeliningCompatibilityClient client(NULL); 119 HttpPipeliningCompatibilityClient client(NULL);
120 net::TestCompletionCallback callback; 120 net::TestCompletionCallback callback;
121 client.Start(test_server_.GetURL("").spec(), 121 client.Start(test_server_.GetURL("").spec(),
122 requests, options, callback.callback(), 122 requests, options, callback.callback(),
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 callback.WaitForResult(); 586 callback.WaitForResult();
587 587
588 ExpectHistogramCount(1, false, FIELD_CANARY); 588 ExpectHistogramCount(1, false, FIELD_CANARY);
589 ExpectHistogramCount(0, false, FIELD_SUCCESS); 589 ExpectHistogramCount(0, false, FIELD_SUCCESS);
590 ExpectHistogramCount(0, true, FIELD_SUCCESS); 590 ExpectHistogramCount(0, true, FIELD_SUCCESS);
591 } 591 }
592 592
593 } // anonymous namespace 593 } // anonymous namespace
594 594
595 } // namespace chrome_browser_net 595 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698