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

Side by Side Diff: ash/test/ash_test_helper.h

Issue 2790903002: Makes AshTestImpl::Create create the right impl based on config (Closed)
Patch Set: Created 3 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 #ifndef ASH_TEST_ASH_TEST_HELPER_H_ 5 #ifndef ASH_TEST_ASH_TEST_HELPER_H_
6 #define ASH_TEST_ASH_TEST_HELPER_H_ 6 #define ASH_TEST_ASH_TEST_HELPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class TestSessionControllerClient; 58 class TestSessionControllerClient;
59 class TestSessionStateDelegate; 59 class TestSessionStateDelegate;
60 60
61 // A helper class that does common initialization required for Ash. Creates a 61 // A helper class that does common initialization required for Ash. Creates a
62 // root window and an ash::Shell instance with a test delegate. 62 // root window and an ash::Shell instance with a test delegate.
63 class AshTestHelper { 63 class AshTestHelper {
64 public: 64 public:
65 explicit AshTestHelper(AshTestEnvironment* ash_test_environment); 65 explicit AshTestHelper(AshTestEnvironment* ash_test_environment);
66 ~AshTestHelper(); 66 ~AshTestHelper();
67 67
68 // Returns the configuration tests are run in.
msw 2017/03/31 16:27:13 nit: "that tests", optionally mention mus to clari
sky 2017/03/31 17:37:22 Done.
69 static Config config() { return config_; }
70
68 // Creates the ash::Shell and performs associated initialization. Set 71 // Creates the ash::Shell and performs associated initialization. Set
69 // |start_session| to true if the user should log in before the test is run. 72 // |start_session| to true if the user should log in before the test is run.
70 void SetUp(bool start_session); 73 void SetUp(bool start_session);
71 74
72 // Destroys the ash::Shell and performs associated cleanup. 75 // Destroys the ash::Shell and performs associated cleanup.
73 void TearDown(); 76 void TearDown();
74 77
75 // Returns a root Window. Usually this is the active root Window, but that 78 // Returns a root Window. Usually this is the active root Window, but that
76 // method can return NULL sometimes, and in those cases, we fall back on the 79 // method can return NULL sometimes, and in those cases, we fall back on the
77 // primary root Window. 80 // primary root Window.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 162
160 std::unique_ptr<TestSessionControllerClient> session_controller_client_; 163 std::unique_ptr<TestSessionControllerClient> session_controller_client_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(AshTestHelper); 165 DISALLOW_COPY_AND_ASSIGN(AshTestHelper);
163 }; 166 };
164 167
165 } // namespace test 168 } // namespace test
166 } // namespace ash 169 } // namespace ash
167 170
168 #endif // ASH_TEST_ASH_TEST_HELPER_H_ 171 #endif // ASH_TEST_ASH_TEST_HELPER_H_
OLDNEW
« ash/test/BUILD.gn ('K') | « ash/test/BUILD.gn ('k') | ash/test/ash_test_impl_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698