OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Is called after the browser is torn down. | 52 // Is called after the browser is torn down. |
53 // Should be used to do the remaining cleanup. | 53 // Should be used to do the remaining cleanup. |
54 virtual void TearDownInProcessBrowserTestFixture() {} | 54 virtual void TearDownInProcessBrowserTestFixture() {} |
55 }; | 55 }; |
56 | 56 |
57 MixinBasedBrowserTest(); | 57 MixinBasedBrowserTest(); |
58 virtual ~MixinBasedBrowserTest(); | 58 virtual ~MixinBasedBrowserTest(); |
59 | 59 |
60 // Override from InProcessBrowserTest. | 60 // Override from InProcessBrowserTest. |
61 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 61 virtual void SetUpCommandLine(base::CommandLine* command_line) override; |
62 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 62 virtual void SetUpInProcessBrowserTestFixture() override; |
63 virtual void SetUpOnMainThread() OVERRIDE; | 63 virtual void SetUpOnMainThread() override; |
64 virtual void TearDownOnMainThread() OVERRIDE; | 64 virtual void TearDownOnMainThread() override; |
65 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; | 65 virtual void TearDownInProcessBrowserTestFixture() override; |
66 | 66 |
67 protected: | 67 protected: |
68 // Adds |mixin| as an mixin for this test, passing ownership | 68 // Adds |mixin| as an mixin for this test, passing ownership |
69 // for it to MixinBasedBrowserTest. | 69 // for it to MixinBasedBrowserTest. |
70 // Should be called in constructor of the test (should be already completed | 70 // Should be called in constructor of the test (should be already completed |
71 // before running set ups). | 71 // before running set ups). |
72 void AddMixin(Mixin* mixin); | 72 void AddMixin(Mixin* mixin); |
73 | 73 |
74 private: | 74 private: |
75 // Keeps all the mixins for this test, | 75 // Keeps all the mixins for this test, |
76 ScopedVector<Mixin> mixins_; | 76 ScopedVector<Mixin> mixins_; |
77 | 77 |
78 // Is false initially, becomes true when any of SetUp* methods is called. | 78 // Is false initially, becomes true when any of SetUp* methods is called. |
79 // Required to check that AddMixin is always called before setting up. | 79 // Required to check that AddMixin is always called before setting up. |
80 bool setup_was_launched_; | 80 bool setup_was_launched_; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace chromeos | 83 } // namespace chromeos |
84 | 84 |
85 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ | 85 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MIXIN_BASED_BROWSER_TEST_H_ |
OLD | NEW |