Index: chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc |
=================================================================== |
--- chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc (revision 235277) |
+++ chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc (working copy) |
@@ -141,6 +141,22 @@ |
region_before.bottom == region_after.bottom; |
ASSERT_FALSE(rects_equal); |
} |
+ |
+IN_PROC_BROWSER_TEST_F(PrintPreviewTest, NoCrashOnCloseWithOtherTabs) { |
+ // Now print preview. |
+ Print(); |
+ |
+ ui_test_utils::NavigateToURLWithDisposition( |
+ browser(), GURL("about:blank"), NEW_FOREGROUND_TAB, |
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
+ |
+ browser()->tab_strip_model()->ActivateTabAt(0, true); |
+ |
+ // Navigate main tab to hide print preview. |
+ ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
+ |
+ browser()->tab_strip_model()->ActivateTabAt(1, true); |
+} |
#endif |
} // namespace |