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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_browsertest.cc

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: merge master Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/browser/resource_dispatcher_host.h" 5 #include "content/public/browser/resource_dispatcher_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 ShouldEnableLoFiModeReloadDisableLoFi) { 788 ShouldEnableLoFiModeReloadDisableLoFi) {
789 // Navigate with ShouldEnableLoFiMode returning true. 789 // Navigate with ShouldEnableLoFiMode returning true.
790 Reset(true); 790 Reset(true);
791 NavigateToURLBlockUntilNavigationsComplete( 791 NavigateToURLBlockUntilNavigationsComplete(
792 shell(), embedded_test_server()->GetURL("/page_with_iframe.html"), 1); 792 shell(), embedded_test_server()->GetURL("/page_with_iframe.html"), 1);
793 CheckResourcesRequested(true); 793 CheckResourcesRequested(true);
794 794
795 // Reload with Lo-Fi disabled. 795 // Reload with Lo-Fi disabled.
796 Reset(false); 796 Reset(false);
797 TestNavigationObserver tab_observer(shell()->web_contents(), 1); 797 TestNavigationObserver tab_observer(shell()->web_contents(), 1);
798 shell()->web_contents()->GetController().ReloadDisableLoFi(true); 798 shell()->web_contents()->GetController().Reload(ReloadType::DISABLE_LOFI_MODE,
799 true);
799 tab_observer.Wait(); 800 tab_observer.Wait();
800 CheckResourcesRequested(false); 801 CheckResourcesRequested(false);
801 } 802 }
802 803
803 namespace { 804 namespace {
804 805
805 struct RequestDataForDelegate { 806 struct RequestDataForDelegate {
806 const GURL url; 807 const GURL url;
807 const GURL first_party; 808 const GURL first_party;
808 const base::Optional<url::Origin> initiator; 809 const base::Optional<url::Origin> initiator;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 EXPECT_EQ(top_origin, delegate_->data()[2]->initiator); 1078 EXPECT_EQ(top_origin, delegate_->data()[2]->initiator);
1078 1079
1079 // Cross-origin subresource requests have a unique first-party, and an 1080 // Cross-origin subresource requests have a unique first-party, and an
1080 // initiator that matches the document in which they're embedded. 1081 // initiator that matches the document in which they're embedded.
1081 EXPECT_EQ(nested_js_url, delegate_->data()[3]->url); 1082 EXPECT_EQ(nested_js_url, delegate_->data()[3]->url);
1082 EXPECT_EQ(kURLWithUniqueOrigin, delegate_->data()[3]->first_party); 1083 EXPECT_EQ(kURLWithUniqueOrigin, delegate_->data()[3]->first_party);
1083 EXPECT_EQ(nested_origin, delegate_->data()[3]->initiator); 1084 EXPECT_EQ(nested_origin, delegate_->data()[3]->initiator);
1084 } 1085 }
1085 1086
1086 } // namespace content 1087 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698