diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/media/buffered_resource_loader.cc | 6 | ||||
-rw-r--r-- | webkit/glue/media/buffered_resource_loader_unittest.cc | 2 | ||||
-rw-r--r-- | webkit/glue/media/simple_data_source.cc | 9 | ||||
-rw-r--r-- | webkit/glue/media/simple_data_source_unittest.cc | 4 |
4 files changed, 3 insertions, 18 deletions
diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc index e7354f6..0570075 100644 --- a/webkit/glue/media/buffered_resource_loader.cc +++ b/webkit/glue/media/buffered_resource_loader.cc @@ -252,11 +252,7 @@ void BufferedResourceLoader::willSendRequest( if (single_origin_) single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); - // Enforce same-origin policy and cause redirects to other origins to - // look like network errors. - // http://dev.w3.org/html5/spec/Overview.html#concept-media-load-resource - // http://dev.w3.org/html5/spec/Overview.html#fetch - if (!single_origin_ || !IsProtocolSupportedForMedia(newRequest.url())) { + if (!IsProtocolSupportedForMedia(newRequest.url())) { // Set the url in the request to an invalid value (empty url). newRequest.setURL(WebKit::WebURL()); DoneStart(net::ERR_ADDRESS_INVALID); diff --git a/webkit/glue/media/buffered_resource_loader_unittest.cc b/webkit/glue/media/buffered_resource_loader_unittest.cc index 158b6dc3..4e0dfef 100644 --- a/webkit/glue/media/buffered_resource_loader_unittest.cc +++ b/webkit/glue/media/buffered_resource_loader_unittest.cc @@ -526,7 +526,6 @@ TEST_F(BufferedResourceLoaderTest, HasSingleOrigin) { // Test redirect to a different domain. Initialize(kHttpUrl, -1, -1); Start(); - EXPECT_CALL(*this, StartCallback(net::ERR_ADDRESS_INVALID)); Redirect(kHttpRedirectToDifferentDomainUrl1); EXPECT_FALSE(loader_->HasSingleOrigin()); StopWhenLoad(); @@ -535,7 +534,6 @@ TEST_F(BufferedResourceLoaderTest, HasSingleOrigin) { Initialize(kHttpUrl, -1, -1); Start(); Redirect(kHttpRedirectToSameDomainUrl1); - EXPECT_CALL(*this, StartCallback(net::ERR_ADDRESS_INVALID)); Redirect(kHttpRedirectToDifferentDomainUrl1); EXPECT_FALSE(loader_->HasSingleOrigin()); StopWhenLoad(); diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc index fee89fe..48da431 100644 --- a/webkit/glue/media/simple_data_source.cc +++ b/webkit/glue/media/simple_data_source.cc @@ -119,15 +119,6 @@ void SimpleDataSource::willSendRequest( if (single_origin_) single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); - // Enforce same-origin policy and cause redirects to other origins to - // look like network errors. - // http://dev.w3.org/html5/spec/Overview.html#concept-media-load-resource - // http://dev.w3.org/html5/spec/Overview.html#fetch - if (!single_origin_) { - DoneInitialization_Locked(false); - return; - } - url_ = newRequest.url(); } diff --git a/webkit/glue/media/simple_data_source_unittest.cc b/webkit/glue/media/simple_data_source_unittest.cc index 125fd33..bfa8e1d 100644 --- a/webkit/glue/media/simple_data_source_unittest.cc +++ b/webkit/glue/media/simple_data_source_unittest.cc @@ -254,16 +254,16 @@ TEST_F(SimpleDataSourceTest, HasSingleOrigin) { // Test redirect to a different domain. InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); - EXPECT_CALL(host_, SetError(media::PIPELINE_ERROR_NETWORK)); Redirect(kHttpRedirectToDifferentDomainUrl1); + RequestSucceeded(false); EXPECT_FALSE(data_source_->HasSingleOrigin()); DestroyDataSource(); // Test redirect to the same domain and then to a different domain. InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); Redirect(kHttpRedirectToSameDomainUrl1); - EXPECT_CALL(host_, SetError(media::PIPELINE_ERROR_NETWORK)); Redirect(kHttpRedirectToDifferentDomainUrl1); + RequestSucceeded(false); EXPECT_FALSE(data_source_->HasSingleOrigin()); DestroyDataSource(); } |