Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: ash/common/system/tray/system_tray_unittest.cc

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698