| OLD | NEW |
| 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 "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 |
| 5 #include "ui/aura/root_window.h" | 7 #include "ui/aura/root_window.h" |
| 6 #include "ui/views/test/views_test_base.h" | 8 #include "ui/views/test/views_test_base.h" |
| 7 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | |
| 8 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
| 9 | 10 |
| 10 namespace views { | 11 namespace views { |
| 11 | 12 |
| 12 typedef ViewsTestBase DesktopNativeWidgetAuraTest; | 13 typedef ViewsTestBase DesktopNativeWidgetAuraTest; |
| 13 | 14 |
| 14 // Verifies creating a Widget with a parent that is not in a RootWindow doesn't | 15 // Verifies creating a Widget with a parent that is not in a RootWindow doesn't |
| 15 // crash. | 16 // crash. |
| 16 TEST_F(DesktopNativeWidgetAuraTest, CreateWithParentNotInRootWindow) { | 17 TEST_F(DesktopNativeWidgetAuraTest, CreateWithParentNotInRootWindow) { |
| 17 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 18 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 Widget widget; | 60 Widget widget; |
| 60 Widget::InitParams init_params = | 61 Widget::InitParams init_params = |
| 61 CreateParams(Widget::InitParams::TYPE_WINDOW); | 62 CreateParams(Widget::InitParams::TYPE_WINDOW); |
| 62 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 63 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 63 init_params.native_widget = new DesktopNativeWidgetAura(&widget); | 64 init_params.native_widget = new DesktopNativeWidgetAura(&widget); |
| 64 widget.Init(init_params); | 65 widget.Init(init_params); |
| 65 EXPECT_FALSE(widget.GetNativeView()->IsVisible()); | 66 EXPECT_FALSE(widget.GetNativeView()->IsVisible()); |
| 66 } | 67 } |
| 67 | 68 |
| 68 } // namespace views | 69 } // namespace views |
| OLD | NEW |