| Index: remoting/protocol/monitored_video_stub_unittest.cc
|
| diff --git a/remoting/protocol/monitored_video_stub_unittest.cc b/remoting/protocol/monitored_video_stub_unittest.cc
|
| index 74f26aa23f381eae1ce5d0e76a1d8812db39dd2c..8cd8f485cebb72abcb5bf6d3153fe5af72335dd1 100644
|
| --- a/remoting/protocol/monitored_video_stub_unittest.cc
|
| +++ b/remoting/protocol/monitored_video_stub_unittest.cc
|
| @@ -14,6 +14,7 @@
|
|
|
| using ::testing::_;
|
| using ::testing::AnyNumber;
|
| +using ::testing::AtMost;
|
| using ::testing::InvokeWithoutArgs;
|
|
|
| namespace remoting {
|
| @@ -46,6 +47,10 @@ class MonitoredVideoStubTest : public testing::Test {
|
|
|
| TEST_F(MonitoredVideoStubTest, OnChannelConnected) {
|
| EXPECT_CALL(*this, OnVideoChannelStatus(true));
|
| + // On slow machines, the connectivity check timer may fire before the test
|
| + // finishes, so we expect to see at most one transition to not ready.
|
| + EXPECT_CALL(*this, OnVideoChannelStatus(false)).Times(AtMost(1));
|
| +
|
| monitor_->ProcessVideoPacket(packet_.Pass(), base::Closure());
|
| base::RunLoop().RunUntilIdle();
|
| }
|
| @@ -64,7 +69,10 @@ TEST_F(MonitoredVideoStubTest, OnChannelDisconnected) {
|
| TEST_F(MonitoredVideoStubTest, OnChannelStayConnected) {
|
| // Verify no extra connected events are fired when packets are received
|
| // frequently
|
| - EXPECT_CALL(*this, OnVideoChannelStatus(_)).Times(1);
|
| + EXPECT_CALL(*this, OnVideoChannelStatus(true));
|
| + // On slow machines, the connectivity check timer may fire before the test
|
| + // finishes, so we expect to see at most one transition to not ready.
|
| + EXPECT_CALL(*this, OnVideoChannelStatus(false)).Times(AtMost(1));
|
|
|
| monitor_->ProcessVideoPacket(packet_.Pass(), base::Closure());
|
| monitor_->ProcessVideoPacket(packet_.Pass(), base::Closure());
|
|
|