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

Unified Diff: remoting/host/security_key/fake_security_key_ipc_client.cc

Issue 2663103003: Fixing Intermittent SecurityKey Unittest Failures (Closed)
Patch Set: Addressing more feedback Created 3 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: remoting/host/security_key/fake_security_key_ipc_client.cc
diff --git a/remoting/host/security_key/fake_security_key_ipc_client.cc b/remoting/host/security_key/fake_security_key_ipc_client.cc
index 70eb8bc053a0c9797730a00333fed5ce0572f8c3..47f0c53148365be665d2f49ded6b2e09cdc937b2 100644
--- a/remoting/host/security_key/fake_security_key_ipc_client.cc
+++ b/remoting/host/security_key/fake_security_key_ipc_client.cc
@@ -109,7 +109,12 @@ void FakeSecurityKeyIpcClient::OnInvalidSession() {
void FakeSecurityKeyIpcClient::OnChannelConnected(int32_t peer_pid) {
ipc_channel_connected_ = true;
- channel_event_callback_.Run();
+
+ // We don't always want to fire this event as only a subset of tests care
+ // about the channel being connected. Tests that do care can register for it.
+ if (on_channel_connected_callback_) {
+ on_channel_connected_callback_.Run();
+ }
}
void FakeSecurityKeyIpcClient::OnChannelError() {

Powered by Google App Engine
This is Rietveld 408576698