| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 for (int i = 0; i <= 10; ++i) { | 259 for (int i = 0; i <= 10; ++i) { |
| 260 ASSERT_GT(10, i) << "BUG: Seems like it'll never happen!"; | 260 ASSERT_GT(10, i) << "BUG: Seems like it'll never happen!"; |
| 261 t += timer_interval; | 261 t += timer_interval; |
| 262 if (oracle.ObserveEventAndDecideCapture( | 262 if (oracle.ObserveEventAndDecideCapture( |
| 263 VideoCaptureOracle::kTimerPoll, gfx::Rect(), t)) { | 263 VideoCaptureOracle::kTimerPoll, gfx::Rect(), t)) { |
| 264 break; | 264 break; |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace content | 269 } // namespace media |
| OLD | NEW |