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

Side by Side Diff: webkit/glue/media/buffered_resource_loader_unittest.cc

Issue 6596059: Revert code that prevents redirecting to different origins because it breaks Vimeo & YouTube. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/media/buffered_resource_loader.cc ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/http/http_util.h" 10 #include "net/http/http_util.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 Start(); 519 Start();
520 Redirect(kHttpRedirectToSameDomainUrl1); 520 Redirect(kHttpRedirectToSameDomainUrl1);
521 Redirect(kHttpRedirectToSameDomainUrl2); 521 Redirect(kHttpRedirectToSameDomainUrl2);
522 FullResponse(1024); 522 FullResponse(1024);
523 EXPECT_TRUE(loader_->HasSingleOrigin()); 523 EXPECT_TRUE(loader_->HasSingleOrigin());
524 StopWhenLoad(); 524 StopWhenLoad();
525 525
526 // Test redirect to a different domain. 526 // Test redirect to a different domain.
527 Initialize(kHttpUrl, -1, -1); 527 Initialize(kHttpUrl, -1, -1);
528 Start(); 528 Start();
529 EXPECT_CALL(*this, StartCallback(net::ERR_ADDRESS_INVALID));
530 Redirect(kHttpRedirectToDifferentDomainUrl1); 529 Redirect(kHttpRedirectToDifferentDomainUrl1);
531 EXPECT_FALSE(loader_->HasSingleOrigin()); 530 EXPECT_FALSE(loader_->HasSingleOrigin());
532 StopWhenLoad(); 531 StopWhenLoad();
533 532
534 // Test redirect to the same domain and then to a different domain. 533 // Test redirect to the same domain and then to a different domain.
535 Initialize(kHttpUrl, -1, -1); 534 Initialize(kHttpUrl, -1, -1);
536 Start(); 535 Start();
537 Redirect(kHttpRedirectToSameDomainUrl1); 536 Redirect(kHttpRedirectToSameDomainUrl1);
538 EXPECT_CALL(*this, StartCallback(net::ERR_ADDRESS_INVALID));
539 Redirect(kHttpRedirectToDifferentDomainUrl1); 537 Redirect(kHttpRedirectToDifferentDomainUrl1);
540 EXPECT_FALSE(loader_->HasSingleOrigin()); 538 EXPECT_FALSE(loader_->HasSingleOrigin());
541 StopWhenLoad(); 539 StopWhenLoad();
542 } 540 }
543 541
544 // TODO(hclam): add unit test for defer loading. 542 // TODO(hclam): add unit test for defer loading.
545 543
546 } // namespace webkit_glue 544 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_resource_loader.cc ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698