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

Unified Diff: chrome/browser/ui/views/frame/browser_view_browsertest_mac.mm

Issue 2375903002: Emit OnNativeWidgetDestroying() before clearing the NSWindowDelegate. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | ui/views/cocoa/bridged_native_widget.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view_browsertest_mac.mm
diff --git a/chrome/browser/ui/views/frame/browser_view_browsertest_mac.mm b/chrome/browser/ui/views/frame/browser_view_browsertest_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..8d6f55cee0e2eded6edc3dd172e45c7557bada5f
--- /dev/null
+++ b/chrome/browser/ui/views/frame/browser_view_browsertest_mac.mm
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/macros.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/test/base/in_process_browser_test.h"
+
+using BrowserViewTestMac = InProcessBrowserTest;
+
+IN_PROC_BROWSER_TEST_F(BrowserViewTestMac, CloseWithTabsStartWithActive) {
+ chrome::AddTabAt(browser(), GURL(), -1, true);
+ chrome::AddTabAt(browser(), GURL(), -1, true);
+ browser()->tab_strip_model()->ActivateTabAt(0, true);
+ NSWindow* window = BrowserView::GetBrowserViewForBrowser(browser())
+ ->GetWidget()->GetNativeWindow();
+ [window close];
+}
tapted 2016/10/05 08:38:18 this isn't the right place for a test, and there a
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | ui/views/cocoa/bridged_native_widget.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698