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

Unified Diff: remoting/host/register_support_host_request_unittest.cc

Issue 2880853002: Reports host version, host os and host os version for It2me Host. (Closed)
Patch Set: Fix Unittest Created 3 years, 7 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 | « remoting/host/register_support_host_request.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/register_support_host_request_unittest.cc
diff --git a/remoting/host/register_support_host_request_unittest.cc b/remoting/host/register_support_host_request_unittest.cc
index b97c192abe63d80d9a8cc5c2e279d2ec2fa9e9c5..af99a9bbc6df712bb71621c3bd9f38278f6365f9 100644
--- a/remoting/host/register_support_host_request_unittest.cc
+++ b/remoting/host/register_support_host_request_unittest.cc
@@ -12,10 +12,12 @@
#include "base/observer_list.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringize_macros.h"
#include "base/test/mock_callback.h"
#include "remoting/base/constants.h"
#include "remoting/base/rsa_key_pair.h"
#include "remoting/base/test_rsa_key_pair.h"
+#include "remoting/host/host_details.h"
#include "remoting/signaling/iq_sender.h"
#include "remoting/signaling/mock_signal_strategy.h"
#include "remoting/signaling/signaling_address.h"
@@ -116,6 +118,18 @@ TEST_F(RegisterSupportHostRequestTest, Send) {
EXPECT_LE(start_time, time);
EXPECT_GE(now, time);
+ XmlElement* host_version = stanza->FirstElement()->FirstNamed(
+ QName(kChromotingXmlNamespace, "host-version"));
+ EXPECT_EQ(STRINGIZE(VERSION), host_version->BodyText());
+
+ XmlElement* host_os_name = stanza->FirstElement()->FirstNamed(
+ QName(kChromotingXmlNamespace, "host-os-name"));
+ EXPECT_EQ(GetHostOperatingSystemName(), host_os_name->BodyText());
+
+ XmlElement* host_os_version = stanza->FirstElement()->FirstNamed(
+ QName(kChromotingXmlNamespace, "host-os-version"));
+ EXPECT_EQ(GetHostOperatingSystemVersion(), host_os_version->BodyText());
+
scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(kTestRsaKeyPair);
ASSERT_TRUE(key_pair.get());
« no previous file with comments | « remoting/host/register_support_host_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698