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; |