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

Unified Diff: chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc

Issue 1754333002: Switch to use Navigation events instead of provisional load events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Get DidFinishNavigation test working Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_tab_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc b/chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc
index 3501f0edb254c6618772d783554ab72f2d4db786..1cb58a3d3d1686ee50377f69b3790700e8986fe7 100644
--- a/chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc
+++ b/chrome/browser/android/offline_pages/offline_page_tab_helper_unittest.cc
@@ -133,13 +133,17 @@ void OfflinePageTabHelperTest::StartLoad(const GURL& url) {
void OfflinePageTabHelperTest::CommitLoad(const GURL& url) {
int entry_id = controller().GetPendingEntry()->GetUniqueID();
- content::RenderFrameHostTester::For(main_rfh())->SendNavigate(
- 0, entry_id, true, url);
+ content::RenderFrameHostTester::For(main_rfh())
+ ->SendNavigate(0, entry_id, true, url);
}
void OfflinePageTabHelperTest::FailLoad(const GURL& url) {
- content::RenderFrameHostTester::For(main_rfh())->SimulateNavigationError(
- url, net::ERR_INTERNET_DISCONNECTED);
+ content::RenderFrameHostTester::For(main_rfh())->SimulateNavigationStart(url);
+ // Set up the error code for the failed navigation.
+ content::RenderFrameHostTester::For(main_rfh())->
+ SimulateNavigationError(url, net::ERR_INTERNET_DISCONNECTED);
+ content::RenderFrameHostTester::For(main_rfh())->
+ SimulateNavigationErrorPageCommit();
// Gives a chance to run delayed task to do redirection.
RunUntilIdle();
}
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698