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

Unified Diff: webkit/glue/media/simple_data_source_unittest.cc

Issue 6580014: Make playback fail if redirected to a different origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix spelling error Created 9 years, 10 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/glue/media/simple_data_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/media/simple_data_source_unittest.cc
diff --git a/webkit/glue/media/simple_data_source_unittest.cc b/webkit/glue/media/simple_data_source_unittest.cc
index a9a70a47b7a8bd06e693344a774da97a5be5fe96..125fd3324c04dbf41e8f26de627ed9c8f08db36f 100644
--- a/webkit/glue/media/simple_data_source_unittest.cc
+++ b/webkit/glue/media/simple_data_source_unittest.cc
@@ -254,26 +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 twice to a different domain.
- InitializeDataSource(kHttpUrl, media::NewExpectedCallback());
- Redirect(kHttpRedirectToDifferentDomainUrl1);
- Redirect(kHttpRedirectToDifferentDomainUrl2);
- RequestSucceeded(false);
EXPECT_FALSE(data_source_->HasSingleOrigin());
DestroyDataSource();
- // Test to a different domain and then back to the same domain.
- // NOTE: A different origin was encountered at least once so that
- // makes HasSingleOrigin() become false.
+ // Test redirect to the same domain and then to a different domain.
InitializeDataSource(kHttpUrl, media::NewExpectedCallback());
- Redirect(kHttpRedirectToDifferentDomainUrl1);
Redirect(kHttpRedirectToSameDomainUrl1);
- RequestSucceeded(false);
+ EXPECT_CALL(host_, SetError(media::PIPELINE_ERROR_NETWORK));
+ Redirect(kHttpRedirectToDifferentDomainUrl1);
EXPECT_FALSE(data_source_->HasSingleOrigin());
DestroyDataSource();
}
« no previous file with comments | « webkit/glue/media/simple_data_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698