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

Unified Diff: content/shell/browser/layout_test/layout_test_download_manager_delegate.cc

Issue 2842023003: fix a layout test crash due to no browser window (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/layout_test/layout_test_download_manager_delegate.cc
diff --git a/content/shell/browser/layout_test/layout_test_download_manager_delegate.cc b/content/shell/browser/layout_test/layout_test_download_manager_delegate.cc
index 9f7b098b622bfa343e648f9ac7410e6f517e2925..9516f096dce376b494e30700794b997c58bc6d15 100644
--- a/content/shell/browser/layout_test/layout_test_download_manager_delegate.cc
+++ b/content/shell/browser/layout_test/layout_test_download_manager_delegate.cc
@@ -35,7 +35,8 @@ LayoutTestDownloadManagerDelegate::~LayoutTestDownloadManagerDelegate(){
bool LayoutTestDownloadManagerDelegate::ShouldOpenDownload(
DownloadItem* item,
const DownloadOpenDelayedCallback& callback) {
- if (BlinkTestController::Get()->IsMainWindow(item->GetWebContents()) &&
+ if (BlinkTestController::Get() &&
+ BlinkTestController::Get()->IsMainWindow(item->GetWebContents()) &&
item->GetMimeType() == "text/html") {
BlinkTestController::Get()->OpenURL(
net::FilePathToFileURL(item->GetFullPath()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698