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

Side by Side 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: Address review comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_ 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_
6 #define UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_ 6 #define UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/views/test/views_test_helper.h" 11 #include "ui/views/test/views_test_helper.h"
12 12
13 namespace ui { 13 namespace ui {
14 namespace test { 14 namespace test {
15 class ScopedFakeNSWindowFocus; 15 class ScopedFakeNSWindowFocus;
16 class ScopedFakeNSWindowFullscreen; 16 class ScopedFakeNSWindowFullscreen;
17 class ScopedFakeFullKeyboardAccess;
tapted 2016/05/04 06:47:38 nit: sort
karandeepb 2016/05/04 07:13:03 Done.
17 } 18 }
18 class ScopedAnimationDurationScaleMode; 19 class ScopedAnimationDurationScaleMode;
19 } 20 }
20 21
21 namespace views { 22 namespace views {
22 23
23 class ViewsTestHelperMac : public ViewsTestHelper { 24 class ViewsTestHelperMac : public ViewsTestHelper {
24 public: 25 public:
25 ViewsTestHelperMac(); 26 ViewsTestHelperMac();
26 ~ViewsTestHelperMac() override; 27 ~ViewsTestHelperMac() override;
(...skipping 12 matching lines...) Expand all
39 // tests, |faked_focus_| is initialized, permitting a unit test to "fake" this 40 // tests, |faked_focus_| is initialized, permitting a unit test to "fake" this
40 // activation, causing it to be synchronous and per-process instead. 41 // activation, causing it to be synchronous and per-process instead.
41 std::unique_ptr<ui::test::ScopedFakeNSWindowFocus> faked_focus_; 42 std::unique_ptr<ui::test::ScopedFakeNSWindowFocus> faked_focus_;
42 43
43 // Toggling fullscreen mode on Mac can be flaky for tests run in parallel 44 // Toggling fullscreen mode on Mac can be flaky for tests run in parallel
44 // because only one window may be animating into or out of fullscreen at a 45 // because only one window may be animating into or out of fullscreen at a
45 // time. In non-interactive/sharded tests, |faked_fullscreen_| is initialized, 46 // time. In non-interactive/sharded tests, |faked_fullscreen_| is initialized,
46 // permitting a unit test to 'fake' toggling fullscreen mode. 47 // permitting a unit test to 'fake' toggling fullscreen mode.
47 std::unique_ptr<ui::test::ScopedFakeNSWindowFullscreen> faked_fullscreen_; 48 std::unique_ptr<ui::test::ScopedFakeNSWindowFullscreen> faked_fullscreen_;
48 49
50 // Enable fake full keyboard access by default, so that tests don't depend on
51 // system setting of the test machine. Also, this helps to make tests on Mac
52 // more consistent with other platforms, where most views are focusable by
53 // default.
54 std::unique_ptr<ui::test::ScopedFakeFullKeyboardAccess>
55 faked_full_keyboard_access_;
56
49 DISALLOW_COPY_AND_ASSIGN(ViewsTestHelperMac); 57 DISALLOW_COPY_AND_ASSIGN(ViewsTestHelperMac);
50 }; 58 };
51 59
52 } // namespace views 60 } // namespace views
53 61
54 #endif // UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_ 62 #endif // UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698