OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/macros.h" |
5 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "ui/views/controls/native/native_view_host.h" | 7 #include "ui/views/controls/native/native_view_host.h" |
7 #include "ui/views/test/views_test_base.h" | 8 #include "ui/views/test/views_test_base.h" |
8 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
9 #include "ui/views/widget/native_widget_private.h" | 10 #include "ui/views/widget/native_widget_private.h" |
10 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
11 | 12 |
12 namespace views { | 13 namespace views { |
13 | 14 |
14 class ScopedTestWidget { | 15 class ScopedTestWidget { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 EXPECT_EQ(toplevel_widget.get(), | 96 EXPECT_EQ(toplevel_widget.get(), |
96 internal::NativeWidgetPrivate::GetTopLevelNativeWidget( | 97 internal::NativeWidgetPrivate::GetTopLevelNativeWidget( |
97 child_widget->GetWidget()->GetNativeView())); | 98 child_widget->GetWidget()->GetNativeView())); |
98 } | 99 } |
99 // NativeViewHost only had a weak reference to the |child_widget|'s | 100 // NativeViewHost only had a weak reference to the |child_widget|'s |
100 // NativeView. Delete it and the associated Widget. | 101 // NativeView. Delete it and the associated Widget. |
101 child_widget->CloseNow(); | 102 child_widget->CloseNow(); |
102 } | 103 } |
103 | 104 |
104 } // namespace views | 105 } // namespace views |
OLD | NEW |