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

Side by Side Diff: ash/system/tray/tray_details_view_unittest.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system/tray/tray_details_view.h" 5 #include "ash/system/tray/tray_details_view.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_widget.h" 8 #include "ash/shelf/shelf_widget.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 public: 78 public:
79 TestItem() : SystemTrayItem(GetSystemTray()), tray_view_(NULL) {} 79 TestItem() : SystemTrayItem(GetSystemTray()), tray_view_(NULL) {}
80 80
81 // Overridden from SystemTrayItem: 81 // Overridden from SystemTrayItem:
82 views::View* CreateTrayView(user::LoginStatus status) override { 82 views::View* CreateTrayView(user::LoginStatus status) override {
83 tray_view_ = new views::View; 83 tray_view_ = new views::View;
84 return tray_view_; 84 return tray_view_;
85 } 85 }
86 views::View* CreateDefaultView(user::LoginStatus status) override { 86 views::View* CreateDefaultView(user::LoginStatus status) override {
87 default_view_ = new views::View; 87 default_view_ = new views::View;
88 default_view_->SetFocusable(true); 88 default_view_->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
89 return default_view_; 89 return default_view_;
90 } 90 }
91 views::View* CreateDetailedView(user::LoginStatus status) override { 91 views::View* CreateDetailedView(user::LoginStatus status) override {
92 detailed_view_ = new TestDetailsView(this); 92 detailed_view_ = new TestDetailsView(this);
93 return detailed_view_; 93 return detailed_view_;
94 } 94 }
95 void DestroyTrayView() override { tray_view_ = NULL; } 95 void DestroyTrayView() override { tray_view_ = NULL; }
96 void DestroyDefaultView() override { default_view_ = NULL; } 96 void DestroyDefaultView() override { default_view_ = NULL; }
97 void DestroyDetailedView() override { detailed_view_ = NULL; } 97 void DestroyDetailedView() override { detailed_view_ = NULL; }
98 98
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 gfx::Rect bounds = button->GetBoundsInScreen(); 272 gfx::Rect bounds = button->GetBoundsInScreen();
273 gfx::Point initial_point(bounds.x() - 1, bounds.y()); 273 gfx::Point initial_point(bounds.x() - 1, bounds.y());
274 generator.set_current_location(initial_point); 274 generator.set_current_location(initial_point);
275 generator.MoveMouseBy(1, 0); 275 generator.MoveMouseBy(1, 0);
276 RunAllPendingInMessageLoop(); 276 RunAllPendingInMessageLoop();
277 EXPECT_TRUE(button->background()); 277 EXPECT_TRUE(button->background());
278 } 278 }
279 279
280 } // namespace test 280 } // namespace test
281 } // namespace ash 281 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698