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

Unified Diff: chrome/browser/chromeos/offline/offline_load_page_unittest.cc

Issue 1002803002: Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relax the dcheck Created 5 years, 7 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
Index: chrome/browser/chromeos/offline/offline_load_page_unittest.cc
diff --git a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
index 6261d3cc6604b49a994889c18d0b8477987c3484..8bf9a982be76efd2e52857c8bc9a0d50cbb0d5cd 100644
--- a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
@@ -61,10 +61,14 @@ class OfflineLoadPageTest : public ChromeRenderViewHostTestHarness {
user_response_ = CANCEL;
}
- void Navigate(const char* url, int page_id) {
- WebContentsTester::For(web_contents())->TestDidNavigate(
- web_contents()->GetMainFrame(), page_id, GURL(url),
- ui::PAGE_TRANSITION_TYPED);
+ void Navigate(const char* url,
+ int page_id,
+ int nav_entry_id,
+ bool did_create_new_entry) {
+ WebContentsTester::For(web_contents())
+ ->TestDidNavigate(web_contents()->GetMainFrame(), page_id, nav_entry_id,
+ did_create_new_entry, GURL(url),
+ ui::PAGE_TRANSITION_TYPED);
}
void ShowInterstitial(const char* url) {
@@ -91,7 +95,7 @@ void TestOfflineLoadPage::NotifyBlockingPageComplete(bool proceed) {
TEST_F(OfflineLoadPageTest, OfflinePageProceed) {
// Start a load.
- Navigate(kURL1, 1);
+ Navigate(kURL1, 1, 0, true);
// Load next page.
controller().LoadURL(GURL(kURL2), content::Referrer(),
ui::PAGE_TRANSITION_TYPED, std::string());
@@ -113,14 +117,14 @@ TEST_F(OfflineLoadPageTest, OfflinePageProceed) {
EXPECT_EQ(kURL2, web_contents()->GetVisibleURL().spec());
// Commit navigation and the interstitial page is gone.
- Navigate(kURL2, 2);
+ Navigate(kURL2, 2, 0, true);
EXPECT_FALSE(GetOfflineLoadPage());
}
// Tests showing an offline page and not proceeding.
TEST_F(OfflineLoadPageTest, OfflinePageDontProceed) {
// Start a load.
- Navigate(kURL1, 1);
+ Navigate(kURL1, 1, 0, true);
controller().LoadURL(GURL(kURL2), content::Referrer(),
ui::PAGE_TRANSITION_TYPED, std::string());

Powered by Google App Engine
This is Rietveld 408576698