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

Unified Diff: ui/views/test/views_test_helper_mac.h

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased Created 4 years, 7 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
Index: ui/views/test/views_test_helper_mac.h
diff --git a/ui/views/test/views_test_helper_mac.h b/ui/views/test/views_test_helper_mac.h
index d30737261a85e2f66ba0b0f047d1e2ad6ce5f3b2..fd58853ce715ae7117d9a549c9c1330391527533 100644
--- a/ui/views/test/views_test_helper_mac.h
+++ b/ui/views/test/views_test_helper_mac.h
@@ -12,6 +12,7 @@
namespace ui {
namespace test {
+class ScopedFakeFullKeyboardAccess;
class ScopedFakeNSWindowFocus;
class ScopedFakeNSWindowFullscreen;
}
@@ -46,6 +47,13 @@ class ViewsTestHelperMac : public ViewsTestHelper {
// permitting a unit test to 'fake' toggling fullscreen mode.
std::unique_ptr<ui::test::ScopedFakeNSWindowFullscreen> faked_fullscreen_;
+ // Enable fake full keyboard access by default, so that tests don't depend on
+ // system setting of the test machine. Also, this helps to make tests on Mac
+ // more consistent with other platforms, where most views are focusable by
+ // default.
+ std::unique_ptr<ui::test::ScopedFakeFullKeyboardAccess>
+ faked_full_keyboard_access_;
+
DISALLOW_COPY_AND_ASSIGN(ViewsTestHelperMac);
};

Powered by Google App Engine
This is Rietveld 408576698