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

Unified Diff: media/base/android/media_url_demuxer_unittest.cc

Issue 2230583002: Add MediaPlayerRenderer/MediaPlayerRendererClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added MEDIA_EXPORT. Created 4 years, 4 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/base/android/media_url_demuxer.cc ('k') | media/base/media_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_url_demuxer_unittest.cc
diff --git a/media/base/android/media_url_demuxer_unittest.cc b/media/base/android/media_url_demuxer_unittest.cc
deleted file mode 100644
index 495ed2f462dbd617843ef72605db00fdc0eee12f..0000000000000000000000000000000000000000
--- a/media/base/android/media_url_demuxer_unittest.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 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/bind_helpers.h"
-#include "base/macros.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "base/run_loop.h"
-#include "media/base/android/media_url_demuxer.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace media {
-
-class MediaUrlDemuxerTest : public testing::Test {
- public:
- MediaUrlDemuxerTest() : default_url_("http://example.com/") {}
-
- void InitializeTest(const GURL& gurl) {
- demuxer_.reset(
- new MediaUrlDemuxer(base::ThreadTaskRunnerHandle::Get(), gurl));
- }
-
- void InitializeTest() { InitializeTest(default_url_); }
-
- void VerifyCallbackOk(PipelineStatus status) {
- EXPECT_EQ(PIPELINE_OK, status);
- }
-
- GURL default_url_;
- std::unique_ptr<Demuxer> demuxer_;
-
- // Necessary, or else base::ThreadTaskRunnerHandle::Get() fails.
- base::MessageLoop message_loop_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MediaUrlDemuxerTest);
-};
-
-TEST_F(MediaUrlDemuxerTest, BaseCase) {
- InitializeTest();
-
- EXPECT_EQ(DemuxerStreamProvider::Type::URL, demuxer_->GetType());
- EXPECT_EQ(default_url_, demuxer_->GetUrl());
-}
-
-TEST_F(MediaUrlDemuxerTest, AcceptsEmptyStrings) {
- InitializeTest(GURL());
-
- EXPECT_EQ(GURL::EmptyGURL(), demuxer_->GetUrl());
-}
-
-TEST_F(MediaUrlDemuxerTest, InitializeReturnsPipelineOk) {
- InitializeTest();
- demuxer_->Initialize(nullptr,
- base::Bind(&MediaUrlDemuxerTest::VerifyCallbackOk,
- base::Unretained(this)),
- false);
-
- base::RunLoop().RunUntilIdle();
-}
-
-TEST_F(MediaUrlDemuxerTest, SeekReturnsPipelineOk) {
- InitializeTest();
- demuxer_->Seek(base::TimeDelta(),
- base::Bind(&MediaUrlDemuxerTest::VerifyCallbackOk,
- base::Unretained(this)));
-
- base::RunLoop().RunUntilIdle();
-}
-
-} // namespace media
« no previous file with comments | « media/base/android/media_url_demuxer.cc ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698