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

Side by Side Diff: ui/views/test/platform_test_helper_cocoa.mm

Issue 2488393003: Changes views_aura_mus_unittests to create DesktopNativeWidgetAura (Closed)
Patch Set: remove this and fix mac Created 4 years, 1 month 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
« no previous file with comments | « ui/views/test/platform_test_helper.cc ('k') | ui/views/test/scoped_views_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/test/platform_test_helper.h"
6
7 #include <Cocoa/Cocoa.h>
8
9 #import "base/mac/scoped_nsobject.h"
10 #import "base/mac/scoped_objc_class_swizzler.h"
11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h"
13 #import "ui/views/cocoa/bridged_native_widget.h"
14 #include "ui/views/widget/native_widget_mac.h"
15 #include "ui/views/widget/widget.h"
16
17 namespace views {
18
19 void PlatformTestHelper::SimulateNativeDestroy(Widget* widget) {
20 // Retain the window while closing it, otherwise the window may lose its
21 // last owner before -[NSWindow close] completes (this offends AppKit).
22 // Usually this reference will exist on an event delivered to the runloop.
23 base::scoped_nsobject<NSWindow> window([widget->GetNativeWindow() retain]);
24 [window close];
25 }
26
27 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/platform_test_helper.cc ('k') | ui/views/test/scoped_views_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698