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

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

Issue 2611773002: Removes code using mus client lib (Closed)
Patch Set: dont run on linux Created 3 years, 11 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
« no previous file with comments | « ui/views/test/native_widget_factory_mus.cc ('k') | ui/views/test/platform_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PLATFORM_TEST_HELPER_H_ 5 #ifndef UI_VIEWS_TEST_PLATFORM_TEST_HELPER_H_
6 #define UI_VIEWS_TEST_PLATFORM_TEST_HELPER_H_ 6 #define UI_VIEWS_TEST_PLATFORM_TEST_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 class ViewsTestHelper; 15 class ViewsTestHelper;
16 class Widget; 16 class Widget;
17 17
18 class PlatformTestHelper { 18 class PlatformTestHelper {
19 public: 19 public:
20 using Factory = base::Callback<std::unique_ptr<PlatformTestHelper>(void)>; 20 using Factory = base::Callback<std::unique_ptr<PlatformTestHelper>(void)>;
21 PlatformTestHelper() {} 21 PlatformTestHelper() {}
22 virtual ~PlatformTestHelper() {} 22 virtual ~PlatformTestHelper() {}
23 23
24 static void set_factory(const Factory& factory); 24 static void set_factory(const Factory& factory);
25 static std::unique_ptr<PlatformTestHelper> Create(); 25 static std::unique_ptr<PlatformTestHelper> Create();
26 26
27 // Whether we are running under the mus environment. Methods are static so
28 // that they can be called before Create().
29 static void SetIsMus(); 27 static void SetIsMus();
30 static bool IsMus(); 28 static bool IsMus();
31 29
32 static void SetIsAuraMusClient();
33 static bool IsAuraMusClient();
34
35 // Called once the ViewsTestHelper has been created, but before SetUp() is 30 // Called once the ViewsTestHelper has been created, but before SetUp() is
36 // called. 31 // called.
37 virtual void OnTestHelperCreated(ViewsTestHelper* helper) {} 32 virtual void OnTestHelperCreated(ViewsTestHelper* helper) {}
38 33
39 // Simulate an OS-level destruction of the native window held by |widget|. 34 // Simulate an OS-level destruction of the native window held by |widget|.
40 virtual void SimulateNativeDestroy(Widget* widget); 35 virtual void SimulateNativeDestroy(Widget* widget);
41 36
42 private: 37 private:
43 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelper); 38 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelper);
44 }; 39 };
45 40
46 } // namespace views 41 } // namespace views
47 42
48 #endif // UI_VIEWS_TEST_PLATFORM_TEST_HELPER_H_ 43 #endif // UI_VIEWS_TEST_PLATFORM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/views/test/native_widget_factory_mus.cc ('k') | ui/views/test/platform_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698