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

Unified Diff: ash/common/system/tray/tray_details_view_unittest.cc

Issue 2434553003: [Ash MD] Restore focus on detailed row when exiting detailed view (Closed)
Patch Set: rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view_unittest.cc
diff --git a/ash/common/system/tray/tray_details_view_unittest.cc b/ash/common/system/tray/tray_details_view_unittest.cc
index 8fb70e0dbb7523da254e9b98151af0e3eb79cdc6..c5ea6a601b27733e6861a78e1344a7cdb04088c8 100644
--- a/ash/common/system/tray/tray_details_view_unittest.cc
+++ b/ash/common/system/tray/tray_details_view_unittest.cc
@@ -138,6 +138,10 @@ class TrayDetailsViewTest : public AshTestBase {
detailed->TransitionToDefaultView();
}
+ void FocusBackButton(TestDetailsView* detailed) {
+ detailed->back_button_->RequestFocus();
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(TrayDetailsViewTest);
};
@@ -167,7 +171,10 @@ TEST_F(TrayDetailsViewTest, TransitionToDefaultViewTest) {
// Transition back to default view, the default view of item 2 should have
// focus.
- test_item_2->detailed_view()->FocusTitleRow();
+ if (MaterialDesignController::IsSystemTrayMenuMaterial())
+ FocusBackButton(test_item_2->detailed_view());
+ else
+ test_item_2->detailed_view()->FocusTitleRow();
TransitionFromDetailedToDefaultView(test_item_2->detailed_view());
RunAllPendingInMessageLoop();
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698