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

Unified Diff: net/websockets/websocket_channel_test.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_channel.cc ('k') | net/websockets/websocket_handshake_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel_test.cc
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index f814f10fba2bd61391df991481cc02fff2a4fd4e..d5ec3da478b6737eac94a066e238616228cfeb1b 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -127,6 +127,8 @@ const size_t kDefaultInitialQuota = 1 << 17;
// kDefaultSendQuotaLowWaterMark change.
const size_t kDefaultQuotaRefreshTrigger = (1 << 16) + 1;
+const int kVeryBigTimeoutMillis = 60 * 60 * 24 * 1000;
+
// TestTimeouts::tiny_timeout() is 100ms! I could run halfway around the world
// in that time! I would like my tests to run a bit quicker.
const int kVeryTinyTimeoutMillis = 1;
@@ -2145,6 +2147,8 @@ TEST_F(WebSocketChannelEventInterfaceTest,
// was fired by the behaviour of the WebSocketChannel object.
channel_->SetClosingHandshakeTimeoutForTesting(
TimeDelta::FromMilliseconds(kVeryTinyTimeoutMillis));
+ channel_->SetUnderlyingConnectionCloseTimeoutForTesting(
+ TimeDelta::FromMilliseconds(kVeryBigTimeoutMillis));
channel_->StartClosingHandshake(kWebSocketNormalClosure, "");
checkpoint.Call(1);
completion.WaitForResult();
@@ -2175,6 +2179,8 @@ TEST_F(WebSocketChannelEventInterfaceTest,
}
CreateChannelAndConnectSuccessfully();
channel_->SetClosingHandshakeTimeoutForTesting(
+ TimeDelta::FromMilliseconds(kVeryBigTimeoutMillis));
+ channel_->SetUnderlyingConnectionCloseTimeoutForTesting(
TimeDelta::FromMilliseconds(kVeryTinyTimeoutMillis));
checkpoint.Call(1);
completion.WaitForResult();
@@ -3304,6 +3310,8 @@ class WebSocketChannelStreamTimeoutTest : public WebSocketChannelStreamTest {
channel_->SendFlowControl(kPlentyOfQuota);
channel_->SetClosingHandshakeTimeoutForTesting(
TimeDelta::FromMilliseconds(kVeryTinyTimeoutMillis));
+ channel_->SetUnderlyingConnectionCloseTimeoutForTesting(
+ TimeDelta::FromMilliseconds(kVeryTinyTimeoutMillis));
connect_data_.creator.connect_delegate->OnSuccess(stream_.Pass());
}
};
« no previous file with comments | « net/websockets/websocket_channel.cc ('k') | net/websockets/websocket_handshake_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698