| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |