diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:25:57 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:25:57 +0000 |
commit | be93be84596e5d610f4feeef53b2cb9cd1195dca (patch) | |
tree | 11014abdb230970c41baa668c18dfb2f5332ed96 /remoting/host/server_log_entry_unittest.cc | |
parent | c351e829e6f49069abf0f50adde2aa657807a812 (diff) | |
download | chromium_src-be93be84596e5d610f4feeef53b2cb9cd1195dca.zip chromium_src-be93be84596e5d610f4feeef53b2cb9cd1195dca.tar.gz chromium_src-be93be84596e5d610f4feeef53b2cb9cd1195dca.tar.bz2 |
The chromoting hosts log an "IT2Me or Me2Me" field to the server.
BUG=106208
TEST=none
Review URL: http://codereview.chromium.org/9192025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/server_log_entry_unittest.cc')
-rw-r--r-- | remoting/host/server_log_entry_unittest.cc | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/remoting/host/server_log_entry_unittest.cc b/remoting/host/server_log_entry_unittest.cc index 11bf863..55c676c 100644 --- a/remoting/host/server_log_entry_unittest.cc +++ b/remoting/host/server_log_entry_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -102,4 +102,36 @@ TEST_F(ServerLogEntryTest, AddHostFields) { error; } +TEST_F(ServerLogEntryTest, AddModeField1) { + scoped_ptr<ServerLogEntry> entry( + ServerLogEntry::MakeSessionStateChange(true)); + entry->AddModeField(ServerLogEntry::IT2ME); + scoped_ptr<XmlElement> stanza(entry->ToStanza()); + std::string error; + std::map<std::string, std::string> key_value_pairs; + key_value_pairs["role"] = "host"; + key_value_pairs["event-name"] = "session-state"; + key_value_pairs["session-state"] = "connected"; + key_value_pairs["mode"] = "it2me"; + std::set<std::string> keys; + ASSERT_TRUE(VerifyStanza(key_value_pairs, keys, stanza.get(), &error)) << + error; +} + +TEST_F(ServerLogEntryTest, AddModeField2) { + scoped_ptr<ServerLogEntry> entry( + ServerLogEntry::MakeSessionStateChange(true)); + entry->AddModeField(ServerLogEntry::ME2ME); + scoped_ptr<XmlElement> stanza(entry->ToStanza()); + std::string error; + std::map<std::string, std::string> key_value_pairs; + key_value_pairs["role"] = "host"; + key_value_pairs["event-name"] = "session-state"; + key_value_pairs["session-state"] = "connected"; + key_value_pairs["mode"] = "me2me"; + std::set<std::string> keys; + ASSERT_TRUE(VerifyStanza(key_value_pairs, keys, stanza.get(), &error)) << + error; +} + } // namespace remoting |