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 "ash/ash_switches.h" | 5 #include "ash/ash_switches.h" |
6 #include "ash/launcher/launcher.h" | 6 #include "ash/launcher/launcher.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/root_window_layout_manager.h" | 10 #include "ash/wm/root_window_layout_manager.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 // Create a normal window. It is not maximized. | 330 // Create a normal window. It is not maximized. |
331 views::Widget::InitParams widget_params( | 331 views::Widget::InitParams widget_params( |
332 views::Widget::InitParams::TYPE_WINDOW); | 332 views::Widget::InitParams::TYPE_WINDOW); |
333 widget_params.bounds.SetRect(11, 22, 300, 400); | 333 widget_params.bounds.SetRect(11, 22, 300, 400); |
334 views::Widget* widget = CreateTestWindow(widget_params); | 334 views::Widget* widget = CreateTestWindow(widget_params); |
335 widget->Show(); | 335 widget->Show(); |
336 EXPECT_FALSE(widget->IsMaximized()); | 336 EXPECT_FALSE(widget->IsMaximized()); |
337 | 337 |
338 // Shelf defaults to visible. | 338 // Shelf defaults to visible. |
339 EXPECT_TRUE(Shell::GetInstance()->shelf()->visible()); | 339 EXPECT_EQ(internal::ShelfLayoutManager::VISIBLE, |
| 340 Shell::GetInstance()->shelf()->visibility_state()); |
340 | 341 |
341 // Fullscreen window hides it. | 342 // Fullscreen window hides it. |
342 widget->SetFullscreen(true); | 343 widget->SetFullscreen(true); |
343 EXPECT_FALSE(Shell::GetInstance()->shelf()->visible()); | 344 EXPECT_EQ(internal::ShelfLayoutManager::HIDDEN, |
| 345 Shell::GetInstance()->shelf()->visibility_state()); |
344 | 346 |
345 // Restoring the window restores it. | 347 // Restoring the window restores it. |
346 widget->Restore(); | 348 widget->Restore(); |
347 EXPECT_TRUE(Shell::GetInstance()->shelf()->visible()); | 349 EXPECT_EQ(internal::ShelfLayoutManager::VISIBLE, |
| 350 Shell::GetInstance()->shelf()->visibility_state()); |
348 | 351 |
349 // Clean up. | 352 // Clean up. |
350 widget->Close(); | 353 widget->Close(); |
351 } | 354 } |
352 | 355 |
353 } // namespace ash | 356 } // namespace ash |
OLD | NEW |