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

Side by Side Diff: jingle/glue/proxy_resolving_client_socket_unittest.cc

Issue 11421172: jingle: Update the calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | jingle/glue/task_pump_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "jingle/glue/proxy_resolving_client_socket.h" 5 #include "jingle/glue/proxy_resolving_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "net/base/mock_host_resolver.h" 10 #include "net/base/mock_host_resolver.h"
(...skipping 27 matching lines...) Expand all
38 : url_request_context_getter_(new net::TestURLRequestContextGetter( 38 : url_request_context_getter_(new net::TestURLRequestContextGetter(
39 base::MessageLoopProxy::current(), 39 base::MessageLoopProxy::current(),
40 scoped_ptr<net::TestURLRequestContext>( 40 scoped_ptr<net::TestURLRequestContext>(
41 new MyTestURLRequestContext))) {} 41 new MyTestURLRequestContext))) {}
42 42
43 virtual ~ProxyResolvingClientSocketTest() {} 43 virtual ~ProxyResolvingClientSocketTest() {}
44 44
45 virtual void TearDown() { 45 virtual void TearDown() {
46 // Clear out any messages posted by ProxyResolvingClientSocket's 46 // Clear out any messages posted by ProxyResolvingClientSocket's
47 // destructor. 47 // destructor.
48 message_loop_.RunAllPending(); 48 message_loop_.RunUntilIdle();
49 } 49 }
50 50
51 MessageLoop message_loop_; 51 MessageLoop message_loop_;
52 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_; 52 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
53 }; 53 };
54 54
55 // TODO(sanjeevr): Fix this test on Linux. 55 // TODO(sanjeevr): Fix this test on Linux.
56 TEST_F(ProxyResolvingClientSocketTest, DISABLED_ConnectError) { 56 TEST_F(ProxyResolvingClientSocketTest, DISABLED_ConnectError) {
57 net::HostPortPair dest("0.0.0.0", 0); 57 net::HostPortPair dest("0.0.0.0", 0);
58 ProxyResolvingClientSocket proxy_resolving_socket( 58 ProxyResolvingClientSocket proxy_resolving_socket(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const net::ProxyRetryInfoMap& retry_info = 109 const net::ProxyRetryInfoMap& retry_info =
110 context->proxy_service()->proxy_retry_info(); 110 context->proxy_service()->proxy_retry_info();
111 111
112 EXPECT_EQ(1u, retry_info.size()); 112 EXPECT_EQ(1u, retry_info.size());
113 net::ProxyRetryInfoMap::const_iterator iter = retry_info.find("bad:99"); 113 net::ProxyRetryInfoMap::const_iterator iter = retry_info.find("bad:99");
114 EXPECT_TRUE(iter != retry_info.end()); 114 EXPECT_TRUE(iter != retry_info.end());
115 } 115 }
116 116
117 // TODO(sanjeevr): Add more unit-tests. 117 // TODO(sanjeevr): Add more unit-tests.
118 } // namespace jingle_glue 118 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | jingle/glue/task_pump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698