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

Side by Side Diff: media/blink/buffered_data_source_host_impl_unittest.cc

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/media/buffered_data_source_host_impl.h" 5 #include "media/blink/buffered_data_source_host_impl.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace content { 8 namespace media {
9 9
10 class BufferedDataSourceHostImplTest : public testing::Test { 10 class BufferedDataSourceHostImplTest : public testing::Test {
11 public: 11 public:
12 BufferedDataSourceHostImplTest() {} 12 BufferedDataSourceHostImplTest() {}
13 13
14 void Add() { 14 void Add() {
15 host_.AddBufferedTimeRanges(&ranges_, base::TimeDelta::FromSeconds(10)); 15 host_.AddBufferedTimeRanges(&ranges_, base::TimeDelta::FromSeconds(10));
16 } 16 }
17 17
18 protected: 18 protected:
19 BufferedDataSourceHostImpl host_; 19 BufferedDataSourceHostImpl host_;
20 media::Ranges<base::TimeDelta> ranges_; 20 Ranges<base::TimeDelta> ranges_;
21 21
22 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImplTest); 22 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImplTest);
23 }; 23 };
24 24
25 TEST_F(BufferedDataSourceHostImplTest, Empty) { 25 TEST_F(BufferedDataSourceHostImplTest, Empty) {
26 EXPECT_FALSE(host_.DidLoadingProgress()); 26 EXPECT_FALSE(host_.DidLoadingProgress());
27 Add(); 27 Add();
28 EXPECT_EQ(0u, ranges_.size()); 28 EXPECT_EQ(0u, ranges_.size());
29 } 29 }
30 30
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Add(); 65 Add();
66 EXPECT_EQ(1u, ranges_.size()); 66 EXPECT_EQ(1u, ranges_.size());
67 } 67 }
68 68
69 TEST_F(BufferedDataSourceHostImplTest, DidLoadingProgress) { 69 TEST_F(BufferedDataSourceHostImplTest, DidLoadingProgress) {
70 host_.AddBufferedByteRange(10, 20); 70 host_.AddBufferedByteRange(10, 20);
71 EXPECT_TRUE(host_.DidLoadingProgress()); 71 EXPECT_TRUE(host_.DidLoadingProgress());
72 EXPECT_FALSE(host_.DidLoadingProgress()); 72 EXPECT_FALSE(host_.DidLoadingProgress());
73 } 73 }
74 74
75 } // namespace content 75 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/buffered_data_source_host_impl.cc ('k') | media/blink/buffered_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698