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

Side by Side Diff: chrome/browser/chromeos/login/mixin_based_browser_test.cc

Issue 574703002: Creating mixin-supporting InProcessBrowserTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edited .gypi so that it links correctly everywhere where LoginManagerTest appears Created 6 years, 3 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 | « chrome/browser/chromeos/login/mixin_based_browser_test.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h"
6
7 namespace chromeos {
8
9 MixinBasedBrowserTest::MixinBasedBrowserTest() : setup_was_launched_(false) {
10 }
11
12 MixinBasedBrowserTest::~MixinBasedBrowserTest() {
13 }
14
15 void MixinBasedBrowserTest::SetUpCommandLine(base::CommandLine* command_line) {
16 setup_was_launched_ = true;
17 for (ScopedVector<Mixin>::iterator it = mixins_.begin(); it != mixins_.end();
18 ++it) {
19 (*it)->SetUpCommandLine(command_line);
20 }
21 InProcessBrowserTest::SetUpCommandLine(command_line);
22 }
23
24 void MixinBasedBrowserTest::SetUpInProcessBrowserTestFixture() {
25 setup_was_launched_ = true;
26 for (ScopedVector<Mixin>::iterator it = mixins_.begin(); it != mixins_.end();
27 ++it) {
28 (*it)->SetUpInProcessBrowserTestFixture();
29 }
30 InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
31 }
32
33 void MixinBasedBrowserTest::SetUpOnMainThread() {
34 setup_was_launched_ = true;
35 for (ScopedVector<Mixin>::iterator it = mixins_.begin(); it != mixins_.end();
36 ++it) {
37 (*it)->SetUpOnMainThread();
38 }
39 InProcessBrowserTest::SetUpOnMainThread();
40 }
41
42 void MixinBasedBrowserTest::TearDownOnMainThread() {
43 InProcessBrowserTest::TearDownOnMainThread();
44 for (ScopedVector<Mixin>::reverse_iterator it = mixins_.rbegin();
45 it != mixins_.rend();
46 ++it) {
47 (*it)->TearDownInProcessBrowserTestFixture();
48 }
49 }
50 void MixinBasedBrowserTest::TearDownInProcessBrowserTestFixture() {
51 InProcessBrowserTest::TearDownInProcessBrowserTestFixture();
52 for (ScopedVector<Mixin>::reverse_iterator it = mixins_.rbegin();
53 it != mixins_.rend();
54 ++it) {
55 (*it)->TearDownInProcessBrowserTestFixture();
56 }
57 }
58
59 void MixinBasedBrowserTest::AddMixin(MixinBasedBrowserTest::Mixin* mixin) {
60 CHECK(!setup_was_launched_)
61 << "You are trying to add a mixin after setting up has already started.";
62 mixins_.push_back(mixin);
63 }
64
65 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mixin_based_browser_test.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698