OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/controls/native/native_view_host_aura.h" | 5 #include "ui/views/controls/native/native_view_host_aura.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 DestroyHost(); | 152 DestroyHost(); |
153 EXPECT_FALSE(child_win->GetProperty(views::kHostViewKey)); | 153 EXPECT_FALSE(child_win->GetProperty(views::kHostViewKey)); |
154 EXPECT_FALSE(child_win->GetProperty(aura::client::kHostWindowKey)); | 154 EXPECT_FALSE(child_win->GetProperty(aura::client::kHostWindowKey)); |
155 } | 155 } |
156 | 156 |
157 // Tests that the NativeViewHost reports the cursor set on its native view. | 157 // Tests that the NativeViewHost reports the cursor set on its native view. |
158 TEST_F(NativeViewHostAuraTest, CursorForNativeView) { | 158 TEST_F(NativeViewHostAuraTest, CursorForNativeView) { |
159 CreateHost(); | 159 CreateHost(); |
160 | 160 |
161 toplevel()->SetCursor(ui::kCursorHand); | 161 toplevel()->SetCursor(ui::CursorType::kHand); |
162 child()->SetCursor(ui::kCursorWait); | 162 child()->SetCursor(ui::CursorType::kWait); |
163 ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, gfx::Point(0, 0), | 163 ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, gfx::Point(0, 0), |
164 gfx::Point(0, 0), ui::EventTimeForNow(), 0, 0); | 164 gfx::Point(0, 0), ui::EventTimeForNow(), 0, 0); |
165 | 165 |
166 EXPECT_EQ(ui::kCursorWait, host()->GetCursor(move_event).native_type()); | 166 EXPECT_EQ(ui::CursorType::kWait, host()->GetCursor(move_event).native_type()); |
167 | 167 |
168 DestroyHost(); | 168 DestroyHost(); |
169 } | 169 } |
170 | 170 |
171 // Test that destroying the top level widget before destroying the attached | 171 // Test that destroying the top level widget before destroying the attached |
172 // NativeViewHost works correctly. Specifically the associated NVH should be | 172 // NativeViewHost works correctly. Specifically the associated NVH should be |
173 // destroyed and there shouldn't be any errors. | 173 // destroyed and there shouldn't be any errors. |
174 TEST_F(NativeViewHostAuraTest, DestroyWidget) { | 174 TEST_F(NativeViewHostAuraTest, DestroyWidget) { |
175 ResetHostDestroyedCount(); | 175 ResetHostDestroyedCount(); |
176 CreateHost(); | 176 CreateHost(); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 host()->SetVisible(false); | 377 host()->SetVisible(false); |
378 EXPECT_FALSE(clipping_window()->IsVisible()); | 378 EXPECT_FALSE(clipping_window()->IsVisible()); |
379 EXPECT_FALSE(child()->IsVisible()); | 379 EXPECT_FALSE(child()->IsVisible()); |
380 | 380 |
381 DestroyHost(); | 381 DestroyHost(); |
382 DestroyTopLevel(); | 382 DestroyTopLevel(); |
383 } | 383 } |
384 | 384 |
385 } // namespace views | 385 } // namespace views |
OLD | NEW |