OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_change_notification_listener.h" | 5 #include "remoting/host/host_change_notification_listener.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "remoting/base/constants.h" | 15 #include "remoting/base/constants.h" |
16 #include "remoting/signaling/mock_signal_strategy.h" | 16 #include "remoting/signaling/mock_signal_strategy.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 19 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
20 #include "third_party/webrtc/libjingle/xmpp/constants.h" | 20 #include "third_party/libjingle_xmpp/xmpp/constants.h" |
21 | 21 |
22 using buzz::QName; | 22 using buzz::QName; |
23 using buzz::XmlElement; | 23 using buzz::XmlElement; |
24 | 24 |
25 using testing::NotNull; | 25 using testing::NotNull; |
26 using testing::Return; | 26 using testing::Return; |
27 | 27 |
28 namespace remoting { | 28 namespace remoting { |
29 | 29 |
30 namespace { | 30 namespace { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 std::unique_ptr<XmlElement> stanza = | 147 std::unique_ptr<XmlElement> stanza = |
148 GetNotificationStanza("update", kHostId, kTestBotJid); | 148 GetNotificationStanza("update", kHostId, kTestBotJid); |
149 host_change_notification_listener_->OnSignalStrategyIncomingStanza( | 149 host_change_notification_listener_->OnSignalStrategyIncomingStanza( |
150 stanza.get()); | 150 stanza.get()); |
151 message_loop_.task_runner()->PostTask( | 151 message_loop_.task_runner()->PostTask( |
152 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | 152 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
153 base::RunLoop().Run(); | 153 base::RunLoop().Run(); |
154 } | 154 } |
155 | 155 |
156 } // namespace remoting | 156 } // namespace remoting |
OLD | NEW |