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/protocol/monitored_video_stub.h" | 5 #include "remoting/protocol/monitored_video_stub.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
9 #include "base/test/test_timeouts.h" | 11 #include "base/test/test_timeouts.h" |
10 #include "remoting/protocol/protocol_mock_objects.h" | 12 #include "remoting/protocol/protocol_mock_objects.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 | 15 |
14 using ::testing::_; | 16 using ::testing::_; |
15 using ::testing::AnyNumber; | 17 using ::testing::AnyNumber; |
16 using ::testing::AtMost; | 18 using ::testing::AtMost; |
17 using ::testing::InvokeWithoutArgs; | 19 using ::testing::InvokeWithoutArgs; |
18 | 20 |
19 namespace remoting { | 21 namespace remoting { |
20 namespace protocol { | 22 namespace protocol { |
21 | 23 |
22 static const int64 kTestOverrideDelayMilliseconds = 1; | 24 static const int64_t kTestOverrideDelayMilliseconds = 1; |
23 | 25 |
24 class MonitoredVideoStubTest : public testing::Test { | 26 class MonitoredVideoStubTest : public testing::Test { |
25 protected: | 27 protected: |
26 void SetUp() override { | 28 void SetUp() override { |
27 packet_.reset(new VideoPacket()); | 29 packet_.reset(new VideoPacket()); |
28 monitor_.reset(new MonitoredVideoStub( | 30 monitor_.reset(new MonitoredVideoStub( |
29 &video_stub_, | 31 &video_stub_, |
30 base::TimeDelta::FromMilliseconds(kTestOverrideDelayMilliseconds), | 32 base::TimeDelta::FromMilliseconds(kTestOverrideDelayMilliseconds), |
31 base::Bind( | 33 base::Bind( |
32 &MonitoredVideoStubTest::OnVideoChannelStatus, | 34 &MonitoredVideoStubTest::OnVideoChannelStatus, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 88 |
87 message_loop_.PostDelayedTask( | 89 message_loop_.PostDelayedTask( |
88 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), | 90 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), |
89 // The delay should be much greater than |kTestOverrideDelayMilliseconds|. | 91 // The delay should be much greater than |kTestOverrideDelayMilliseconds|. |
90 TestTimeouts::tiny_timeout()); | 92 TestTimeouts::tiny_timeout()); |
91 message_loop_.Run(); | 93 message_loop_.Run(); |
92 } | 94 } |
93 | 95 |
94 } // namespace protocol | 96 } // namespace protocol |
95 } // namespace remoting | 97 } // namespace remoting |
OLD | NEW |