OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/app_remoting_latency_test_fixture.h" | 5 #include "remoting/test/app_remoting_latency_test_fixture.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 FAIL(); | 44 FAIL(); |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 void AppRemotingLatencyTestFixture::TearDown() { | 48 void AppRemotingLatencyTestFixture::TearDown() { |
49 connection_helper_.reset(); | 49 connection_helper_.reset(); |
50 } | 50 } |
51 | 51 |
52 void AppRemotingLatencyTestFixture::SetExpectedImagePattern( | 52 void AppRemotingLatencyTestFixture::SetExpectedImagePattern( |
53 const webrtc::DesktopRect& expected_rect, | 53 const webrtc::DesktopRect& expected_rect, |
54 const RgbaColor& expected_color) { | 54 const uint32_t expected_color) { |
55 DCHECK(thread_checker_.CalledOnValidThread()); | 55 DCHECK(thread_checker_.CalledOnValidThread()); |
joedow
2015/07/10 23:39:15
remove const
liaoyuke
2015/07/13 16:05:38
Done.
| |
56 DCHECK(!run_loop_ || !run_loop_->running()); | 56 DCHECK(!run_loop_ || !run_loop_->running()); |
57 | 57 |
58 run_loop_.reset(new base::RunLoop()); | 58 run_loop_.reset(new base::RunLoop()); |
59 base::ThreadTaskRunnerHandle::Get()->PostTask( | 59 base::ThreadTaskRunnerHandle::Get()->PostTask( |
60 FROM_HERE, | 60 FROM_HERE, |
61 base::Bind(&TestVideoRenderer::SetImagePatternAndMatchedCallback, | 61 base::Bind(&TestVideoRenderer::SetImagePatternAndMatchedCallback, |
62 test_video_renderer_, expected_rect, expected_color, | 62 test_video_renderer_, expected_rect, expected_color, |
63 run_loop_->QuitClosure())); | 63 run_loop_->QuitClosure())); |
64 } | 64 } |
65 | 65 |
(...skipping 10 matching lines...) Expand all Loading... | |
76 // Image pattern is matched if we stopped because of the reply not the timer. | 76 // Image pattern is matched if we stopped because of the reply not the timer. |
77 bool image_pattern_is_matched = (timer_->IsRunning()); | 77 bool image_pattern_is_matched = (timer_->IsRunning()); |
78 timer_->Stop(); | 78 timer_->Stop(); |
79 run_loop_.reset(); | 79 run_loop_.reset(); |
80 | 80 |
81 return image_pattern_is_matched; | 81 return image_pattern_is_matched; |
82 } | 82 } |
83 | 83 |
84 } // namespace test | 84 } // namespace test |
85 } // namespace remoting | 85 } // namespace remoting |
OLD | NEW |