| 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/client/client_status_logger.h" | 5 #include "remoting/client/client_status_logger.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "remoting/protocol/performance_tracker.h" | 8 #include "remoting/protocol/performance_tracker.h" |
| 9 #include "remoting/signaling/mock_signal_strategy.h" | 9 #include "remoting/signaling/mock_signal_strategy.h" |
| 10 #include "remoting/signaling/server_log_entry_unittest.h" | 10 #include "remoting/signaling/server_log_entry_unittest.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.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/webrtc/libjingle/xmllite/xmlelement.h" |
| 14 | 14 |
| 15 using buzz::XmlElement; | 15 using buzz::XmlElement; |
| 16 using buzz::QName; | 16 using buzz::QName; |
| 17 using remoting::protocol::ConnectionToHost; | 17 using remoting::protocol::ConnectionToHost; |
| 18 using testing::_; | 18 using testing::_; |
| 19 using testing::DeleteArg; | 19 using testing::DeleteArg; |
| 20 using testing::InSequence; | 20 using testing::InSequence; |
| 21 using testing::Return; | 21 using testing::Return; |
| 22 | 22 |
| 23 namespace remoting { | 23 namespace remoting { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 ACTION_P(QuitMainMessageLoop, message_loop) { | 27 ACTION_P(QuitMainMessageLoop, message_loop) { |
| 28 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); | 28 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 29 } | 29 } |
| 30 | 30 |
| 31 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; | 31 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; |
| 32 const char kClientJid[] = "host@domain.com/1234"; | 32 const char kClientJid[] = "host@domain.com/1234"; |
| 33 | 33 |
| 34 MATCHER_P2(IsStateChange, new_state, error, "") { | 34 MATCHER_P2(IsStateChange, new_state, error, "") { |
| 35 XmlElement* entry = GetSingleLogEntryFromStanza(arg); | 35 XmlElement* entry = GetSingleLogEntryFromStanza(arg); |
| 36 if (!entry) { | 36 if (!entry) { |
| 37 return false; | 37 return false; |
| 38 } | 38 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 protocol::PerformanceTracker perf_tracker; | 144 protocol::PerformanceTracker perf_tracker; |
| 145 client_status_logger_->LogStatistics(&perf_tracker); | 145 client_status_logger_->LogStatistics(&perf_tracker); |
| 146 | 146 |
| 147 client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED); | 147 client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED); |
| 148 client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED); | 148 client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED); |
| 149 message_loop_.Run(); | 149 message_loop_.Run(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace remoting | 152 } // namespace remoting |
| OLD | NEW |