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

Side by Side Diff: ui/views/test/views_test_helper_mac.h

Issue 1782773002: MacViews: Fix ViewTest.HandleAccelerator by faking window activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delay the activatableness Created 4 years, 9 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/views/test/views_test_helper.h" 10 #include "ui/views/test/views_test_helper.h"
11 11
12 namespace ui { 12 namespace ui {
13 namespace test {
14 class ScopedFakeNSWindowFocus;
15 }
13 class ScopedAnimationDurationScaleMode; 16 class ScopedAnimationDurationScaleMode;
14 } 17 }
15 18
16 namespace views { 19 namespace views {
17 20
18 class ViewsTestHelperMac : public ViewsTestHelper { 21 class ViewsTestHelperMac : public ViewsTestHelper {
19 public: 22 public:
20 ViewsTestHelperMac(); 23 ViewsTestHelperMac();
21 ~ViewsTestHelperMac() override; 24 ~ViewsTestHelperMac() override;
22 25
23 // ViewsTestHelper: 26 // ViewsTestHelper:
24 void TearDown() override; 27 void TearDown() override;
28 void EnableFakeWindowActivation() override;
25 29
26 private: 30 private:
27 // Disable animations during tests. 31 // Disable animations during tests.
28 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 32 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
29 33
34 scoped_ptr<ui::test::ScopedFakeNSWindowFocus> faked_focus_;
35
30 DISALLOW_COPY_AND_ASSIGN(ViewsTestHelperMac); 36 DISALLOW_COPY_AND_ASSIGN(ViewsTestHelperMac);
31 }; 37 };
32 38
33 } // namespace views 39 } // namespace views
34 40
35 #endif // UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_ 41 #endif // UI_VIEWS_TEST_VIEWS_TEST_HELPER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698