OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/renderer_host/media/video_capture_oracle.h" | 5 #include "content/browser/renderer_host/media/video_capture_oracle.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 namespace { | 12 namespace { |
13 | 13 |
14 void SteadyStateSampleAndAdvance(base::TimeDelta vsync, | 14 void SteadyStateSampleAndAdvance(base::TimeDelta vsync, |
15 SmoothEventSampler* sampler, base::Time* t) { | 15 SmoothEventSampler* sampler, base::Time* t) { |
16 ASSERT_TRUE(sampler->AddEventAndConsiderSampling(*t)); | 16 ASSERT_TRUE(sampler->AddEventAndConsiderSampling(*t)); |
17 ASSERT_TRUE(sampler->HasUnrecordedEvent()); | 17 ASSERT_TRUE(sampler->HasUnrecordedEvent()); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 { false, 0 }, { true, 16.72 }, { true, 33.44 }, { false, 0 }, | 469 { false, 0 }, { true, 16.72 }, { true, 33.44 }, { false, 0 }, |
470 { true, 33.441 }, { false, 16.72 }, { true, 16.72 }, { true, 50.16 } | 470 { true, 33.441 }, { false, 16.72 }, { true, 16.72 }, { true, 50.16 } |
471 }; | 471 }; |
472 | 472 |
473 SmoothEventSampler sampler(base::TimeDelta::FromSeconds(1) / 30, true, 3); | 473 SmoothEventSampler sampler(base::TimeDelta::FromSeconds(1) / 30, true, 3); |
474 ReplayCheckingSamplerDecisions(data_points, arraysize(data_points), &sampler); | 474 ReplayCheckingSamplerDecisions(data_points, arraysize(data_points), &sampler); |
475 } | 475 } |
476 | 476 |
477 } // namespace | 477 } // namespace |
478 } // namespace content | 478 } // namespace content |
OLD | NEW |