OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/host_experiment_session_plugin.h" | 5 #include "remoting/host/host_experiment_session_plugin.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
11 #include "remoting/host/host_attributes.h" | 11 #include "remoting/host/host_attributes.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 13 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
14 | 14 |
15 using buzz::QName; | 15 using buzz::QName; |
16 using buzz::XmlElement; | 16 using buzz::XmlElement; |
17 | 17 |
18 namespace remoting { | 18 namespace remoting { |
19 | 19 |
20 TEST(HostExperimentSessionPluginTest, AttachAttributes) { | 20 TEST(HostExperimentSessionPluginTest, AttachAttributes) { |
21 HostExperimentSessionPlugin plugin; | 21 HostExperimentSessionPlugin plugin; |
22 std::unique_ptr<XmlElement> attachments = plugin.GetNextMessage(); | 22 std::unique_ptr<XmlElement> attachments = plugin.GetNextMessage(); |
23 ASSERT_TRUE(attachments); | 23 ASSERT_TRUE(attachments); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ASSERT_TRUE(plugin.configuration_received()); | 55 ASSERT_TRUE(plugin.configuration_received()); |
56 ASSERT_EQ(plugin.configuration(), "config1"); | 56 ASSERT_EQ(plugin.configuration(), "config1"); |
57 | 57 |
58 configuration->SetBodyText("config2"); | 58 configuration->SetBodyText("config2"); |
59 plugin.OnIncomingMessage(*attachment); | 59 plugin.OnIncomingMessage(*attachment); |
60 ASSERT_TRUE(plugin.configuration_received()); | 60 ASSERT_TRUE(plugin.configuration_received()); |
61 ASSERT_EQ(plugin.configuration(), "config1"); | 61 ASSERT_EQ(plugin.configuration(), "config1"); |
62 } | 62 } |
63 | 63 |
64 } // namespace remoting | 64 } // namespace remoting |
OLD | NEW |