OLD | NEW |
---|---|
(Empty) | |
1 #include "ash/test/ash_test_base.h" | |
sky
2013/04/23 22:34:08
You're missing the copright header here.
| |
2 | |
3 #include "chrome/browser/fullscreen.h" | |
4 #include "ui/aura/root_window.h" | |
5 #include "ui/views/widget/widget.h" | |
6 | |
7 namespace ash { | |
8 namespace { | |
9 | |
10 typedef ash::test::AshTestBase FullscreenChromeOSTest; | |
11 | |
12 // Test that IsFullScreenMode() still returns true if the active window's | |
13 // transient parent is fullscreen. A transient window can be visible while in | |
14 // fullscreen if a user opens a dialog (eg the bookmkark bubble) while the | |
15 // top-of-window views are revealed in immersive fullscreen. | |
16 TEST_F(FullscreenChromeOSTest, TransientParentIsFullscreen) { | |
17 views::Widget::InitParams parent_params; | |
18 parent_params.context = CurrentContext(); | |
19 parent_params.bounds = gfx::Rect(0, 0, 100, 100); | |
20 | |
21 views::Widget* parent = new views::Widget(); | |
22 parent->Init(parent_params); | |
23 parent->SetFullscreen(true); | |
24 parent->Show(); | |
25 | |
26 // |child| is a transient child of |parent|. | |
27 views::Widget::InitParams child_params; | |
28 child_params.parent = parent->GetNativeView(); | |
29 child_params.bounds = gfx::Rect(0, 0, 100, 100); | |
30 | |
31 views::Widget* child = new views::Widget(); | |
32 child->Init(child_params); | |
33 child->Show(); | |
34 child->Activate(); | |
35 ASSERT_TRUE(child->IsActive()); | |
36 | |
37 EXPECT_TRUE(IsFullScreenMode()); | |
sky
2013/04/23 22:34:08
How about an expect for !InFullScreenMode above?
| |
38 } | |
39 | |
40 } // namespace | |
41 } // namespace ash | |
OLD | NEW |