Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Unified Diff: media/filters/video_frame_scheduler_unittest.cc

Issue 1111993002: Remove VideoFrameScheduler and dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/video_frame_scheduler_proxy.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_scheduler_unittest.cc
diff --git a/media/filters/video_frame_scheduler_unittest.cc b/media/filters/video_frame_scheduler_unittest.cc
deleted file mode 100644
index 02b64ae82634bbd056ec2be13b6c2e4381ac37c9..0000000000000000000000000000000000000000
--- a/media/filters/video_frame_scheduler_unittest.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/bind.h"
-#include "base/debug/stack_trace.h"
-#include "base/run_loop.h"
-#include "media/base/video_frame.h"
-#include "media/filters/clockless_video_frame_scheduler.h"
-#include "media/filters/test_video_frame_scheduler.h"
-#include "media/filters/video_frame_scheduler_impl.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace media {
-
-static void DoNothing(const scoped_refptr<VideoFrame>& frame) {
-}
-
-static void CheckForReentrancy(std::string* stack_trace,
- const scoped_refptr<VideoFrame>& frame,
- VideoFrameScheduler::Reason reason) {
- *stack_trace = base::debug::StackTrace().ToString();
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::MessageLoop::QuitClosure());
-}
-
-// Type parameterized test harness for validating API contract of
-// VideoFrameScheduler implementations.
-//
-// NOTE: C++ requires using "this" for derived class templates when referencing
-// class members.
-template <typename T>
-class VideoFrameSchedulerTest : public testing::Test {
- public:
- VideoFrameSchedulerTest() {}
- virtual ~VideoFrameSchedulerTest() {}
-
- base::MessageLoop message_loop_;
- T scheduler_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VideoFrameSchedulerTest);
-};
-
-template <>
-VideoFrameSchedulerTest<ClocklessVideoFrameScheduler>::VideoFrameSchedulerTest()
- : scheduler_(base::Bind(&DoNothing)) {
-}
-
-template <>
-VideoFrameSchedulerTest<VideoFrameSchedulerImpl>::VideoFrameSchedulerTest()
- : scheduler_(message_loop_.message_loop_proxy(), base::Bind(&DoNothing)) {
-}
-
-TYPED_TEST_CASE_P(VideoFrameSchedulerTest);
-
-TYPED_TEST_P(VideoFrameSchedulerTest, ScheduleVideoFrameIsntReentrant) {
- scoped_refptr<VideoFrame> frame =
- VideoFrame::CreateBlackFrame(gfx::Size(8, 8));
-
- std::string stack_trace;
- this->scheduler_.ScheduleVideoFrame(
- frame, base::TimeTicks(), base::Bind(&CheckForReentrancy, &stack_trace));
- EXPECT_TRUE(stack_trace.empty()) << "Reentracy detected:\n" << stack_trace;
-}
-
-REGISTER_TYPED_TEST_CASE_P(VideoFrameSchedulerTest,
- ScheduleVideoFrameIsntReentrant);
-
-INSTANTIATE_TYPED_TEST_CASE_P(ClocklessVideoFrameScheduler,
- VideoFrameSchedulerTest,
- ClocklessVideoFrameScheduler);
-INSTANTIATE_TYPED_TEST_CASE_P(VideoFrameSchedulerImpl,
- VideoFrameSchedulerTest,
- VideoFrameSchedulerImpl);
-INSTANTIATE_TYPED_TEST_CASE_P(TestVideoFrameScheduler,
- VideoFrameSchedulerTest,
- TestVideoFrameScheduler);
-
-} // namespace media
« no previous file with comments | « media/filters/video_frame_scheduler_proxy.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698