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

Unified Diff: chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc

Issue 2345053006: Remove IsSynchronous API from NavigationHandle. (Closed)
Patch Set: Addressed review comments. Created 4 years, 2 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 | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
index d2f1c05235f8fa82deafc04bf9a58e3a92dd192d..4764218c76400f390ed3d434585c79c48d0458c3 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
+++ b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
@@ -31,6 +31,7 @@ using content::ResourceType;
namespace {
+const char* const kStartUrl = "http://whatever.com/index.html";
const char* const kHttpUrl = "http://whatever.com/";
const char* const kHttpsUrl = "https://whatever.com/";
@@ -74,11 +75,13 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness {
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
- // Load kHttpUrl. This ensures that any subsequent navigation to kHttpsUrl2
- // will be properly registered as cross-process.
+ // Load kStartUrl. This ensures that any subsequent navigation to kHttpsUrl2
+ // will be properly registered as cross-process. It should be different than
+ // the rest of the URLs used, otherwise unit tests will clasify navigations
+ // as same document ones, which would be incorrect.
content::WebContentsTester* web_contents_tester =
content::WebContentsTester::For(web_contents());
- web_contents_tester->NavigateAndCommit(GURL(kHttpUrl));
+ web_contents_tester->NavigateAndCommit(GURL(kStartUrl));
content::RenderFrameHostTester* rfh_tester =
content::RenderFrameHostTester::For(main_rfh());
rfh_tester->SimulateNavigationStop();
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698