OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/server_log_entry_host.h" | 5 #include "remoting/host/server_log_entry_host.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/strings/stringize_macros.h" | 9 #include "base/strings/stringize_macros.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "remoting/signaling/server_log_entry.h" | 11 #include "remoting/signaling/server_log_entry.h" |
12 #include "remoting/signaling/server_log_entry_unittest.h" | 12 #include "remoting/signaling/server_log_entry_unittest.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 14 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
15 | 15 |
16 using buzz::XmlAttr; | 16 using buzz::XmlAttr; |
17 using buzz::XmlElement; | 17 using buzz::XmlElement; |
18 | 18 |
19 namespace remoting { | 19 namespace remoting { |
20 | 20 |
21 TEST(ServerLogEntryHostTest, MakeForSessionStateChange) { | 21 TEST(ServerLogEntryHostTest, MakeForSessionStateChange) { |
22 std::unique_ptr<ServerLogEntry> entry( | 22 std::unique_ptr<ServerLogEntry> entry( |
23 MakeLogEntryForSessionStateChange(true)); | 23 MakeLogEntryForSessionStateChange(true)); |
24 std::unique_ptr<XmlElement> stanza = entry->ToStanza(); | 24 std::unique_ptr<XmlElement> stanza = entry->ToStanza(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 key_value_pairs["role"] = "host"; | 106 key_value_pairs["role"] = "host"; |
107 key_value_pairs["event-name"] = "session-state"; | 107 key_value_pairs["event-name"] = "session-state"; |
108 key_value_pairs["session-state"] = "connected"; | 108 key_value_pairs["session-state"] = "connected"; |
109 key_value_pairs["mode"] = "me2me"; | 109 key_value_pairs["mode"] = "me2me"; |
110 std::set<std::string> keys; | 110 std::set<std::string> keys; |
111 ASSERT_TRUE(VerifyStanza(key_value_pairs, keys, stanza.get(), &error)) << | 111 ASSERT_TRUE(VerifyStanza(key_value_pairs, keys, stanza.get(), &error)) << |
112 error; | 112 error; |
113 } | 113 } |
114 | 114 |
115 } // namespace remoting | 115 } // namespace remoting |
OLD | NEW |