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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_apitest.cc

Issue 2937153002: [cast_channel] Create KeepAliveDelegate in CastSocket instead of in CastChannelOpenFunction (Closed)
Patch Set: rebase with master Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_channel_apitest.cc
diff --git a/extensions/browser/api/cast_channel/cast_channel_apitest.cc b/extensions/browser/api/cast_channel/cast_channel_apitest.cc
index b154790299de420f2777c75da51b238465217d88..06d2c82f87c984c011c9881d73a35021d0e1db41 100644
--- a/extensions/browser/api/cast_channel/cast_channel_apitest.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_apitest.cc
@@ -90,8 +90,6 @@ class CastChannelAPITest : public ExtensionApiTest {
void SetUpMockCastSocket() {
extensions::CastChannelAPI* api = GetApi();
- timeout_timer_ = new base::MockTimer(true, false);
- api->SetPingTimeoutTimerForTest(base::WrapUnique(timeout_timer_));
net::IPEndPoint ip_endpoint(net::IPAddress(192, 168, 1, 1), 8009);
mock_cast_socket_ = new MockCastSocket;
@@ -187,7 +185,9 @@ class CastChannelAPITest : public ExtensionApiTest {
void FireTimeout() {
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
- base::Bind(&base::MockTimer::Fire, base::Unretained(timeout_timer_)));
+ base::Bind(&CastTransport::Delegate::OnError,
+ base::Unretained(message_delegate_),
+ cast_channel::ChannelError::PING_TIMEOUT));
}
extensions::CastChannelOpenFunction* CreateOpenFunction(
@@ -207,7 +207,6 @@ class CastChannelAPITest : public ExtensionApiTest {
}
MockCastSocket* mock_cast_socket_;
- base::MockTimer* timeout_timer_;
net::IPEndPoint ip_endpoint_;
LastError last_error_;
CastTransport::Delegate* message_delegate_;
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698