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/common/system/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 422 } |
423 | 423 |
424 #if defined(OS_CHROMEOS) | 424 #if defined(OS_CHROMEOS) |
425 // Accessibility/Settings tray items are available only on cros. | 425 // Accessibility/Settings tray items are available only on cros. |
426 #define MAYBE_WithSystemModal WithSystemModal | 426 #define MAYBE_WithSystemModal WithSystemModal |
427 #else | 427 #else |
428 #define MAYBE_WithSystemModal DISABLED_WithSystemModal | 428 #define MAYBE_WithSystemModal DISABLED_WithSystemModal |
429 #endif | 429 #endif |
430 TEST_F(SystemTrayTest, MAYBE_WithSystemModal) { | 430 TEST_F(SystemTrayTest, MAYBE_WithSystemModal) { |
431 // Check if the accessibility item is created even with system modal dialog. | 431 // Check if the accessibility item is created even with system modal dialog. |
432 WmShell::Get()->GetAccessibilityDelegate()->SetVirtualKeyboardEnabled(true); | 432 WmShell::Get()->accessibility_delegate()->SetVirtualKeyboardEnabled(true); |
433 std::unique_ptr<views::Widget> widget(CreateTestWidget( | 433 std::unique_ptr<views::Widget> widget(CreateTestWidget( |
434 new ModalWidgetDelegate, kShellWindowId_SystemModalContainer, | 434 new ModalWidgetDelegate, kShellWindowId_SystemModalContainer, |
435 gfx::Rect(0, 0, 100, 100))); | 435 gfx::Rect(0, 0, 100, 100))); |
436 | 436 |
437 SystemTray* tray = GetPrimarySystemTray(); | 437 SystemTray* tray = GetPrimarySystemTray(); |
438 tray->ShowDefaultView(BUBBLE_CREATE_NEW); | 438 tray->ShowDefaultView(BUBBLE_CREATE_NEW); |
439 | 439 |
440 ASSERT_TRUE(tray->HasSystemBubble()); | 440 ASSERT_TRUE(tray->HasSystemBubble()); |
441 const views::View* accessibility = | 441 const views::View* accessibility = |
442 tray->GetSystemBubble()->bubble_view()->GetViewByID( | 442 tray->GetSystemBubble()->bubble_view()->GetViewByID( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 // Hide the default view, ensure the tray bubble height is back to zero. | 546 // Hide the default view, ensure the tray bubble height is back to zero. |
547 ASSERT_TRUE(tray->CloseSystemBubble()); | 547 ASSERT_TRUE(tray->CloseSystemBubble()); |
548 RunAllPendingInMessageLoop(); | 548 RunAllPendingInMessageLoop(); |
549 | 549 |
550 EXPECT_EQ(0, notification_tray->tray_bubble_height_for_test()); | 550 EXPECT_EQ(0, notification_tray->tray_bubble_height_for_test()); |
551 } | 551 } |
552 #endif // OS_CHROMEOS | 552 #endif // OS_CHROMEOS |
553 | 553 |
554 } // namespace test | 554 } // namespace test |
555 } // namespace ash | 555 } // namespace ash |
OLD | NEW |