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

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

Issue 2085353004: Update GnubbyAuthHandler to use the current session ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host_extension
Patch Set: Fixing a non-windows build break and some additional cleanup Created 4 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
Index: remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
diff --git a/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc b/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
index 74ba1b7ee6661d14248e644cc95db30ca29ffa65..c9888ca073de84aa0ddcb7819c2b026f311b1b25 100644
--- a/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
+++ b/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
@@ -57,7 +57,10 @@ class GnubbyAuthHandlerLinuxTest : public testing::Test {
send_message_callback_ =
base::Bind(&GnubbyAuthHandlerLinuxTest::SendMessageToClient,
base::Unretained(this));
- auth_handler_ = remoting::GnubbyAuthHandler::Create(send_message_callback_);
+ session_id_callback_ = base::Bind(&GnubbyAuthHandlerLinuxTest::GetSessionId,
+ base::Unretained(this));
+ auth_handler_ = remoting::GnubbyAuthHandler::Create(send_message_callback_,
+ session_id_callback_);
}
void WaitForSendMessageToClient() {
@@ -71,6 +74,8 @@ class GnubbyAuthHandlerLinuxTest : public testing::Test {
run_loop_->Quit();
}
+ uint32_t GetSessionId() const { return UINT32_MAX; }
Sergey Ulanov 2016/06/27 23:51:58 can be a static function.
+
void CheckHostDataMessage(int id, const std::string& expected_data) {
ASSERT_EQ(id, last_connection_id_received_);
ASSERT_EQ(expected_data.length(), last_message_received_.length());
@@ -120,6 +125,7 @@ class GnubbyAuthHandlerLinuxTest : public testing::Test {
std::unique_ptr<GnubbyAuthHandler> auth_handler_;
GnubbyAuthHandler::SendMessageCallback send_message_callback_;
+ GnubbyAuthHandler::SessionIdCallback session_id_callback_;
int last_connection_id_received_;
std::string last_message_received_;

Powered by Google App Engine
This is Rietveld 408576698