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

Side by Side Diff: athena/test/athena_test_base.h

Issue 301593004: Athena unittests framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ATHENA_TEST_ATHENA_TEST_BASE_H_
6 #define ATHENA_TEST_ATHENA_TEST_BASE_H_
7
8 #include "athena/test/athena_test_helper.h"
9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace aura {
14 class Window;
15 }
16
17 namespace athena {
18 namespace test {
19
20 // A base class for athena unit tests.
21 class AthenaTestBase : public testing::Test {
22 public:
23 AthenaTestBase();
24 virtual ~AthenaTestBase();
25
26 // testing::Test:
27 virtual void SetUp() OVERRIDE;
28 virtual void TearDown() OVERRIDE;
29
30 protected:
31 void RunAllPendingInMessageLoop();
32
33 aura::Window* root_window() { return helper_->root_window(); }
34 aura::WindowTreeHost* host() { return helper_->host(); }
35
36 private:
37 bool setup_called_;
38 bool teardown_called_;
39
40 base::MessageLoopForUI message_loop_;
41 scoped_ptr<AthenaTestHelper> helper_;
42
43 DISALLOW_COPY_AND_ASSIGN(AthenaTestBase);
44 };
45
46 } // namespace test
47 } // namespace athena
48
49 #endif // ATHENA_TEST_ATHENA_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698