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

Unified Diff: chrome/browser/sessions/tab_loader.cc

Issue 2466883002: Add TabLoaderTest (Closed)
Patch Set: Created 4 years, 1 month 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/sessions/tab_loader.cc
diff --git a/chrome/browser/sessions/tab_loader.cc b/chrome/browser/sessions/tab_loader.cc
index ba5fb2149ecc87e3abe6c52c4f4c45eef836a945..2feb037b1987cadd12b15bbda5dfc671f18db8eb 100644
--- a/chrome/browser/sessions/tab_loader.cc
+++ b/chrome/browser/sessions/tab_loader.cc
@@ -115,7 +115,9 @@ void TabLoader::StartLoading(const std::vector<RestoredTab>& tabs) {
favicon::ContentFaviconDriver* favicon_driver =
favicon::ContentFaviconDriver::FromWebContents(
restored_tab.contents());
- favicon_driver->FetchFavicon(favicon_driver->GetActiveURL());
+ // |favicon_driver| might be null when testing.
+ if (favicon_driver)
+ favicon_driver->FetchFavicon(favicon_driver->GetActiveURL());
} else {
tabs_loading_.insert(&restored_tab.contents()->GetController());
}
@@ -295,5 +297,9 @@ void TabLoader::StopLoadingTabs() {
LoadNextTab();
}
+bool TabLoader::GetLoadingEnabledForTesting() {
+ return shared_tab_loader_->loading_enabled_;
+}
+
// static
TabLoader* TabLoader::shared_tab_loader_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698