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

Side by Side Diff: ui/views/test/widget_test_aura.cc

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/widget_test.h ('k') | ui/views/test/widget_test_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/test/widget_test.h" 5 #include "ui/views/test/widget_test.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/aura/client/focus_client.h" 8 #include "ui/aura/client/focus_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_delegate.h" 10 #include "ui/aura/window_delegate.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // If second is cleared without success, exit early with failure. 44 // If second is cleared without success, exit early with failure.
45 if (!*second) 45 if (!*second)
46 return false; 46 return false;
47 } 47 }
48 return false; 48 return false;
49 } 49 }
50 50
51 } // namespace 51 } // namespace
52 52
53 // static 53 // static
54 void WidgetTest::SimulateNativeDestroy(Widget* widget) {
55 delete widget->GetNativeView();
56 }
57
58 // static
59 void WidgetTest::SimulateNativeActivate(Widget* widget) { 54 void WidgetTest::SimulateNativeActivate(Widget* widget) {
60 gfx::NativeView native_view = widget->GetNativeView(); 55 gfx::NativeView native_view = widget->GetNativeView();
61 aura::client::GetFocusClient(native_view)->FocusWindow(native_view); 56 aura::client::GetFocusClient(native_view)->FocusWindow(native_view);
62 } 57 }
63 58
64 // static 59 // static
65 bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { 60 bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) {
66 return window->IsVisible(); 61 return window->IsVisible();
67 } 62 }
68 63
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return widget->GetNativeWindow()->GetRootWindow()->GetHost(); 109 return widget->GetNativeWindow()->GetRootWindow()->GetHost();
115 } 110 }
116 111
117 // static 112 // static
118 bool WidgetTest::IsNativeWindowTransparent(gfx::NativeWindow window) { 113 bool WidgetTest::IsNativeWindowTransparent(gfx::NativeWindow window) {
119 return window->transparent(); 114 return window->transparent();
120 } 115 }
121 116
122 } // namespace test 117 } // namespace test
123 } // namespace views 118 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/widget_test.h ('k') | ui/views/test/widget_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698