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

Unified Diff: jingle/notifier/base/chrome_async_socket_unittest.cc

Issue 9419032: Modify the MockConnect constructor to take an enum of ASYNC or SYNC, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix Test Break Created 8 years, 10 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: jingle/notifier/base/chrome_async_socket_unittest.cc
===================================================================
--- jingle/notifier/base/chrome_async_socket_unittest.cc (revision 122403)
+++ jingle/notifier/base/chrome_async_socket_unittest.cc (working copy)
@@ -342,7 +342,7 @@
void DoOpenClosed() {
ExpectClosed();
async_socket_data_provider_.set_connect_data(
- net::MockConnect(false, net::OK));
+ net::MockConnect(net::SYNCHRONOUS, net::OK));
EXPECT_TRUE(chrome_async_socket_->Connect(addr_));
ExpectNonErrorState(ChromeAsyncSocket::STATE_CONNECTING);
@@ -519,7 +519,7 @@
TEST_F(ChromeAsyncSocketTest, PendingConnect) {
async_socket_data_provider_.set_connect_data(
- net::MockConnect(true, net::OK));
+ net::MockConnect(net::ASYNC, net::OK));
EXPECT_TRUE(chrome_async_socket_->Connect(addr_));
ExpectNonErrorState(ChromeAsyncSocket::STATE_CONNECTING);
ExpectNoSignal();
@@ -541,7 +541,7 @@
TEST_F(ChromeAsyncSocketTest, PendingConnectCloseBeforeRead) {
async_socket_data_provider_.set_connect_data(
- net::MockConnect(true, net::OK));
+ net::MockConnect(net::ASYNC, net::OK));
EXPECT_TRUE(chrome_async_socket_->Connect(addr_));
message_loop_.RunAllPending();
@@ -556,7 +556,7 @@
TEST_F(ChromeAsyncSocketTest, PendingConnectError) {
async_socket_data_provider_.set_connect_data(
- net::MockConnect(true, net::ERR_TIMED_OUT));
+ net::MockConnect(net::ASYNC, net::ERR_TIMED_OUT));
EXPECT_TRUE(chrome_async_socket_->Connect(addr_));
message_loop_.RunAllPending();
@@ -583,7 +583,7 @@
TEST_F(ChromeAsyncSocketTest, WrongRead) {
EXPECT_DEBUG_DEATH({
async_socket_data_provider_.set_connect_data(
- net::MockConnect(true, net::OK));
+ net::MockConnect(net::ASYNC, net::OK));
EXPECT_TRUE(chrome_async_socket_->Connect(addr_));
ExpectNonErrorState(ChromeAsyncSocket::STATE_CONNECTING);
ExpectNoSignal();
@@ -897,7 +897,7 @@
TEST_F(ChromeAsyncSocketTest, FailedSSLConnect) {
ssl_socket_data_provider_.connect =
- net::MockConnect(true, net::ERR_CERT_COMMON_NAME_INVALID),
+ net::MockConnect(net::ASYNC, net::ERR_CERT_COMMON_NAME_INVALID),
async_socket_data_provider_.AddRead(net::MockRead(kReadData));
DoOpenClosed();

Powered by Google App Engine
This is Rietveld 408576698