Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
index 7cf64a2a989d34ce043c83fb3efd4ab15f5930b5..e3de8fe5c6b2e6ad834e71a0a2a8ec690f654852 100644 |
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
@@ -45,7 +45,9 @@ void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() { |
void ChromeBrowserMainExtraPartsViews::PreCreateThreads() { |
#if defined(USE_AURA) && !defined(OS_CHROMEOS) |
- display::Screen::SetScreenInstance(views::CreateDesktopScreen()); |
+ // The screen may have already been set in test initialization. |
+ if (!display::Screen::GetScreen()) |
+ display::Screen::SetScreenInstance(views::CreateDesktopScreen()); |
#endif |
} |