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

Unified Diff: chrome/browser/ui/views/frame/browser_view_browsertest.cc

Issue 154633003: Attempt at fixing possible shutdown crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnWindowDestroying Created 6 years, 10 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
Index: chrome/browser/ui/views/frame/browser_view_browsertest.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_browsertest.cc b/chrome/browser/ui/views/frame/browser_view_browsertest.cc
index 26da81c65234412a83289cc82767f503193fb18f..236e7745e931ec1200d38828f217f21876aee939 100644
--- a/chrome/browser/ui/views/frame/browser_view_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_view_browsertest.cc
@@ -54,3 +54,18 @@ IN_PROC_BROWSER_TEST_F(BrowserViewTest, CloseWithTabs) {
browser2->tab_strip_model()->GetWebContentsAt(1));
BrowserView::GetBrowserViewForBrowser(browser2)->GetWidget()->CloseNow();
}
+
+// Same as CloseWithTabs, but activates the first tab, which is the first tab
+// BrowserView will destroy.
+IN_PROC_BROWSER_TEST_F(BrowserViewTest, CloseWithTabsStartWithActive) {
+ Browser* browser2 =
+ new Browser(Browser::CreateParams(browser()->profile(),
+ browser()->host_desktop_type()));
+ chrome::AddTabAt(browser2, GURL(), -1, true);
+ chrome::AddTabAt(browser2, GURL(), -1, true);
+ browser2->tab_strip_model()->ActivateTabAt(0, true);
+ TestWebContentsObserver observer(
+ browser2->tab_strip_model()->GetWebContentsAt(0),
+ browser2->tab_strip_model()->GetWebContentsAt(1));
+ BrowserView::GetBrowserViewForBrowser(browser2)->GetWidget()->CloseNow();
+}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698