| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/register_support_host_request.h" | 5 #include "remoting/host/register_support_host_request.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 using testing::Invoke; | 27 using testing::Invoke; |
| 28 using testing::NotNull; | 28 using testing::NotNull; |
| 29 using testing::Return; | 29 using testing::Return; |
| 30 using testing::SaveArg; | 30 using testing::SaveArg; |
| 31 | 31 |
| 32 namespace remoting { | 32 namespace remoting { |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; | 35 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; |
| 36 const char kTestJid[] = "user@gmail.com/chromoting123"; | 36 const char kTestJid[] = "user@gmail.com/chromoting123"; |
| 37 const int64 kTestTime = 123123123; | |
| 38 const char kSupportId[] = "AB4RF3"; | 37 const char kSupportId[] = "AB4RF3"; |
| 39 const char kSupportIdLifetime[] = "300"; | 38 const char kSupportIdLifetime[] = "300"; |
| 40 const char kStanzaId[] = "123"; | 39 const char kStanzaId[] = "123"; |
| 41 | 40 |
| 42 ACTION_P(AddListener, list) { | 41 ACTION_P(AddListener, list) { |
| 43 list->AddObserver(arg0); | 42 list->AddObserver(arg0); |
| 44 } | 43 } |
| 45 ACTION_P(RemoveListener, list) { | 44 ACTION_P(RemoveListener, list) { |
| 46 list->RemoveObserver(arg0); | 45 list->RemoveObserver(arg0); |
| 47 } | 46 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 while ((listener = it.GetNext()) != NULL) { | 155 while ((listener = it.GetNext()) != NULL) { |
| 157 if (listener->OnSignalStrategyIncomingStanza(response.get())) | 156 if (listener->OnSignalStrategyIncomingStanza(response.get())) |
| 158 consumed++; | 157 consumed++; |
| 159 } | 158 } |
| 160 EXPECT_EQ(1, consumed); | 159 EXPECT_EQ(1, consumed); |
| 161 | 160 |
| 162 message_loop_.RunUntilIdle(); | 161 message_loop_.RunUntilIdle(); |
| 163 } | 162 } |
| 164 | 163 |
| 165 } // namespace remoting | 164 } // namespace remoting |
| OLD | NEW |