OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "media/base/media_url_demuxer.h" | 5 #include "media/base/media_url_demuxer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Necessary, or else base::ThreadTaskRunnerHandle::Get() fails. | 40 // Necessary, or else base::ThreadTaskRunnerHandle::Get() fails. |
41 base::MessageLoop message_loop_; | 41 base::MessageLoop message_loop_; |
42 | 42 |
43 private: | 43 private: |
44 DISALLOW_COPY_AND_ASSIGN(MediaUrlDemuxerTest); | 44 DISALLOW_COPY_AND_ASSIGN(MediaUrlDemuxerTest); |
45 }; | 45 }; |
46 | 46 |
47 TEST_F(MediaUrlDemuxerTest, BaseCase) { | 47 TEST_F(MediaUrlDemuxerTest, BaseCase) { |
48 InitializeTest(); | 48 InitializeTest(); |
49 | 49 |
50 EXPECT_EQ(DemuxerStreamProvider::Type::URL, demuxer_->GetType()); | 50 EXPECT_EQ(MediaResource::Type::URL, demuxer_->GetType()); |
51 | 51 |
52 MediaUrlParams params = demuxer_->GetMediaUrlParams(); | 52 MediaUrlParams params = demuxer_->GetMediaUrlParams(); |
53 EXPECT_EQ(default_media_url_, params.media_url); | 53 EXPECT_EQ(default_media_url_, params.media_url); |
54 EXPECT_EQ(default_first_party_url_, params.first_party_for_cookies); | 54 EXPECT_EQ(default_first_party_url_, params.first_party_for_cookies); |
55 } | 55 } |
56 | 56 |
57 TEST_F(MediaUrlDemuxerTest, AcceptsEmptyStrings) { | 57 TEST_F(MediaUrlDemuxerTest, AcceptsEmptyStrings) { |
58 InitializeTest(GURL(), GURL()); | 58 InitializeTest(GURL(), GURL()); |
59 | 59 |
60 MediaUrlParams params = demuxer_->GetMediaUrlParams(); | 60 MediaUrlParams params = demuxer_->GetMediaUrlParams(); |
(...skipping 14 matching lines...) Expand all Loading... |
75 TEST_F(MediaUrlDemuxerTest, SeekReturnsPipelineOk) { | 75 TEST_F(MediaUrlDemuxerTest, SeekReturnsPipelineOk) { |
76 InitializeTest(); | 76 InitializeTest(); |
77 demuxer_->Seek(base::TimeDelta(), | 77 demuxer_->Seek(base::TimeDelta(), |
78 base::Bind(&MediaUrlDemuxerTest::VerifyCallbackOk, | 78 base::Bind(&MediaUrlDemuxerTest::VerifyCallbackOk, |
79 base::Unretained(this))); | 79 base::Unretained(this))); |
80 | 80 |
81 base::RunLoop().RunUntilIdle(); | 81 base::RunLoop().RunUntilIdle(); |
82 } | 82 } |
83 | 83 |
84 } // namespace media | 84 } // namespace media |
OLD | NEW |