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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_tabstrip.h" 8 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 Browser* browser2 = 47 Browser* browser2 =
48 new Browser(Browser::CreateParams(browser()->profile(), 48 new Browser(Browser::CreateParams(browser()->profile(),
49 browser()->host_desktop_type())); 49 browser()->host_desktop_type()));
50 chrome::AddTabAt(browser2, GURL(), -1, true); 50 chrome::AddTabAt(browser2, GURL(), -1, true);
51 chrome::AddTabAt(browser2, GURL(), -1, true); 51 chrome::AddTabAt(browser2, GURL(), -1, true);
52 TestWebContentsObserver observer( 52 TestWebContentsObserver observer(
53 browser2->tab_strip_model()->GetWebContentsAt(0), 53 browser2->tab_strip_model()->GetWebContentsAt(0),
54 browser2->tab_strip_model()->GetWebContentsAt(1)); 54 browser2->tab_strip_model()->GetWebContentsAt(1));
55 BrowserView::GetBrowserViewForBrowser(browser2)->GetWidget()->CloseNow(); 55 BrowserView::GetBrowserViewForBrowser(browser2)->GetWidget()->CloseNow();
56 } 56 }
57
58 // Same as CloseWithTabs, but activates the first tab, which is the first tab
59 // BrowserView will destroy.
60 IN_PROC_BROWSER_TEST_F(BrowserViewTest, CloseWithTabsStartWithActive) {
61 Browser* browser2 =
62 new Browser(Browser::CreateParams(browser()->profile(),
63 browser()->host_desktop_type()));
64 chrome::AddTabAt(browser2, GURL(), -1, true);
65 chrome::AddTabAt(browser2, GURL(), -1, true);
66 browser2->tab_strip_model()->ActivateTabAt(0, true);
67 TestWebContentsObserver observer(
68 browser2->tab_strip_model()->GetWebContentsAt(0),
69 browser2->tab_strip_model()->GetWebContentsAt(1));
70 BrowserView::GetBrowserViewForBrowser(browser2)->GetWidget()->CloseNow();
71 }
OLDNEW
« 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