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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Issue 49303007: Moves responsibility of invoking OnNativeWidgetCreated to DesktopRootWindowHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk Created 7 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 | 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698