| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/media/capture/video_capture_oracle.h" | 5 #include "media/capture/video_capture_oracle.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace media { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 base::TimeTicks InitialTestTimeTicks() { | 14 base::TimeTicks InitialTestTimeTicks() { |
| 15 return base::TimeTicks() + base::TimeDelta::FromSeconds(1); | 15 return base::TimeTicks() + base::TimeDelta::FromSeconds(1); |
| 16 } | 16 } |
| 17 | 17 |
| 18 } // namespace | 18 } // namespace |
| 19 | 19 |
| 20 // Tests that VideoCaptureOracle filters out events whose timestamps are | 20 // Tests that VideoCaptureOracle filters out events whose timestamps are |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 for (int i = 0; i <= 10; ++i) { | 280 for (int i = 0; i <= 10; ++i) { |
| 281 ASSERT_GT(10, i) << "BUG: Seems like it'll never happen!"; | 281 ASSERT_GT(10, i) << "BUG: Seems like it'll never happen!"; |
| 282 t += timer_interval; | 282 t += timer_interval; |
| 283 if (oracle.ObserveEventAndDecideCapture( | 283 if (oracle.ObserveEventAndDecideCapture( |
| 284 VideoCaptureOracle::kTimerPoll, gfx::Rect(), t)) { | 284 VideoCaptureOracle::kTimerPoll, gfx::Rect(), t)) { |
| 285 break; | 285 break; |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace content | 290 } // namespace media |
| OLD | NEW |