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

Unified Diff: webkit/media/buffered_data_source_unittest.cc

Issue 9269027: Revert 118546 because it caused PrerenderHTML5VideoNetwork to timeout on windows and linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 | « webkit/media/buffered_data_source.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/buffered_data_source_unittest.cc
===================================================================
--- webkit/media/buffered_data_source_unittest.cc (revision 118589)
+++ webkit/media/buffered_data_source_unittest.cc (working copy)
@@ -16,8 +16,8 @@
using ::testing::_;
using ::testing::Assign;
-using ::testing::AtLeast;
using ::testing::Invoke;
+using ::testing::StrictMock;
using ::testing::NiceMock;
using WebKit::WebFrame;
@@ -83,6 +83,7 @@
data_source_ = new MockBufferedDataSource(message_loop_,
view_->mainFrame());
+ data_source_->set_host(&host_);
}
virtual ~BufferedDataSourceTest() {
@@ -90,13 +91,6 @@
}
void Initialize(media::PipelineStatus expected) {
- Initialize(expected, true);
- }
-
- void Initialize(media::PipelineStatus expected, bool set_host) {
- if (set_host)
- data_source_->set_host(&host_);
-
ExpectCreateResourceLoader();
data_source_->Initialize(response_generator_.gurl(),
media::NewExpectedStatusCB(expected));
@@ -107,10 +101,8 @@
void InitializeWith206Response() {
Initialize(media::PIPELINE_OK);
- EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()))
- .Times(AtLeast(1));
- EXPECT_CALL(host_, SetBufferedBytes(0))
- .Times(AtLeast(1));
+ EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length()));
+ EXPECT_CALL(host_, SetBufferedBytes(0));
Respond(response_generator_.Generate206(0));
}
@@ -184,7 +176,7 @@
MockWebFrameClient client_;
WebView* view_;
- NiceMock<media::MockDataSourceHost> host_;
+ StrictMock<media::MockDataSourceHost> host_;
MessageLoop* message_loop_;
private:
@@ -447,10 +439,8 @@
ReadAt(0);
// When the read completes we'll update our network status.
- EXPECT_CALL(host_, SetBufferedBytes(kDataSize))
- .Times(AtLeast(1));
- EXPECT_CALL(host_, SetNetworkActivity(true))
- .Times(AtLeast(1));
+ EXPECT_CALL(host_, SetBufferedBytes(kDataSize));
+ EXPECT_CALL(host_, SetNetworkActivity(true));
EXPECT_CALL(*this, ReadCallback(kDataSize));
FinishRead();
@@ -462,18 +452,4 @@
Stop();
}
-// Make sure information regarding loaded data propogates to the host even if it
-// gets initialized before the host is set.
-TEST_F(BufferedDataSourceTest, HostSetAfterResponse) {
- Initialize(media::PIPELINE_OK, false);
- Respond(response_generator_.Generate206(0));
-
- EXPECT_CALL(host_, SetNetworkActivity(_));
- EXPECT_CALL(host_, SetTotalBytes(_));
- EXPECT_CALL(host_, SetBufferedBytes(_));
- data_source_->set_host(&host_);
-
- Stop();
-}
-
} // namespace webkit_media
« no previous file with comments | « webkit/media/buffered_data_source.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698