OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mus/desktop_window_tree_host_mus.h" | 5 #include "ui/views/mus/desktop_window_tree_host_mus.h" |
6 | 6 |
7 #include "base/debug/stack_trace.h" | 7 #include "base/debug/stack_trace.h" |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 320 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
321 params.shadow_type = Widget::InitParams::SHADOW_TYPE_NONE; | 321 params.shadow_type = Widget::InitParams::SHADOW_TYPE_NONE; |
322 widget.Init(params); | 322 widget.Init(params); |
323 EXPECT_EQ(wm::ShadowElevation::NONE, | 323 EXPECT_EQ(wm::ShadowElevation::NONE, |
324 widget.GetNativeView()->GetProperty(wm::kShadowElevationKey)); | 324 widget.GetNativeView()->GetProperty(wm::kShadowElevationKey)); |
325 EXPECT_EQ(wm::ShadowElevation::NONE, | 325 EXPECT_EQ(wm::ShadowElevation::NONE, |
326 widget.GetNativeView()->GetHost()->window()->GetProperty( | 326 widget.GetNativeView()->GetHost()->window()->GetProperty( |
327 wm::kShadowElevationKey)); | 327 wm::kShadowElevationKey)); |
328 } | 328 } |
329 | 329 |
| 330 TEST_F(DesktopWindowTreeHostMusTest, CreateFullscreenWidget) { |
| 331 const Widget::InitParams::Type kWidgetTypes[] = { |
| 332 Widget::InitParams::TYPE_WINDOW, |
| 333 Widget::InitParams::TYPE_WINDOW_FRAMELESS, |
| 334 }; |
| 335 |
| 336 for (auto widget_type : kWidgetTypes) { |
| 337 Widget widget; |
| 338 Widget::InitParams params(widget_type); |
| 339 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
| 340 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 341 widget.Init(params); |
| 342 |
| 343 EXPECT_TRUE(widget.IsFullscreen()) |
| 344 << "Fullscreen creation failed for type=" << widget_type; |
| 345 } |
| 346 } |
| 347 |
330 } // namespace views | 348 } // namespace views |
OLD | NEW |