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

Side by Side Diff: webkit/media/simple_data_source_unittest.cc

Issue 8936014: Removing DataSource from Filter hierarchy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved preload into a separate file. Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "media/base/filters.h" 6 #include "media/base/filters.h"
7 #include "media/base/mock_callback.h" 7 #include "media/base/mock_callback.h"
8 #include "media/base/mock_filter_host.h" 8 #include "media/base/mock_data_source_host.h"
9 #include "media/base/mock_filters.h" 9 #include "media/base/mock_filters.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader .h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader .h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
16 #include "webkit/media/simple_data_source.h" 16 #include "webkit/media/simple_data_source.h"
17 #include "webkit/mocks/mock_webframeclient.h" 17 #include "webkit/mocks/mock_webframeclient.h"
18 #include "webkit/mocks/mock_weburlloader.h" 18 #include "webkit/mocks/mock_weburlloader.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 } 148 }
149 149
150 MOCK_METHOD1(ReadCallback, void(size_t size)); 150 MOCK_METHOD1(ReadCallback, void(size_t size));
151 151
152 protected: 152 protected:
153 GURL gurl_; 153 GURL gurl_;
154 scoped_ptr<MessageLoop> message_loop_; 154 scoped_ptr<MessageLoop> message_loop_;
155 NiceMock<MockWebURLLoader>* url_loader_; 155 NiceMock<MockWebURLLoader>* url_loader_;
156 scoped_refptr<SimpleDataSource> data_source_; 156 scoped_refptr<SimpleDataSource> data_source_;
157 StrictMock<media::MockFilterHost> host_; 157 StrictMock<media::MockDataSourceHost> host_;
158 158
159 MockWebFrameClient client_; 159 MockWebFrameClient client_;
160 WebView* view_; 160 WebView* view_;
161 161
162 char data_[kDataSize]; 162 char data_[kDataSize];
163 163
164 DISALLOW_COPY_AND_ASSIGN(SimpleDataSourceTest); 164 DISALLOW_COPY_AND_ASSIGN(SimpleDataSourceTest);
165 }; 165 };
166 166
167 TEST_F(SimpleDataSourceTest, InitializeHTTP) { 167 TEST_F(SimpleDataSourceTest, InitializeHTTP) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 InitializeDataSource(kHttpUrl, 274 InitializeDataSource(kHttpUrl,
275 media::NewExpectedStatusCB(media::PIPELINE_OK)); 275 media::NewExpectedStatusCB(media::PIPELINE_OK));
276 Redirect(kHttpRedirectToSameDomainUrl1); 276 Redirect(kHttpRedirectToSameDomainUrl1);
277 Redirect(kHttpRedirectToDifferentDomainUrl1); 277 Redirect(kHttpRedirectToDifferentDomainUrl1);
278 RequestSucceeded(); 278 RequestSucceeded();
279 EXPECT_FALSE(data_source_->HasSingleOrigin()); 279 EXPECT_FALSE(data_source_->HasSingleOrigin());
280 DestroyDataSource(); 280 DestroyDataSource();
281 } 281 }
282 282
283 } // namespace webkit_media 283 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698