Index: content/shell/shell_download_manager_delegate.cc |
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc |
index e0ed2617df1aa5154f8a8d05dbaf23ed49f0f387..dc5a87da1594545088be4bb9d642aa93c2ad06ab 100644 |
--- a/content/shell/shell_download_manager_delegate.cc |
+++ b/content/shell/shell_download_manager_delegate.cc |
@@ -91,7 +91,8 @@ bool ShellDownloadManagerDelegate::ShouldOpenDownload( |
DownloadItem* item, |
const DownloadOpenDelayedCallback& callback) { |
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree) && |
- WebKitTestController::Get()->IsMainWindow(item->GetWebContents())) { |
+ WebKitTestController::Get()->IsMainWindow(item->GetWebContents()) && |
+ item->GetMimeType() == "text/html") { |
WebKitTestController::Get()->OpenURL( |
net::FilePathToFileURL(item->GetFullPath())); |
} |