Roll src/third_party/WebKit f007c95:0171005 (svn 185074:185088)
[chromium-blink-merge.git] / athena / test / base / athena_test_base.h
blobf0bf10b0740b369cdff0944a2a0debcd01c7bd1a
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.
5 #ifndef ATHENA_TEST_BASE_ATHENA_TEST_BASE_H_
6 #define ATHENA_TEST_BASE_ATHENA_TEST_BASE_H_
8 #include "athena/test/base/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"
13 namespace aura {
14 class Window;
15 class WindowDelegate;
18 namespace athena {
19 namespace test {
21 // A base class for athena unit tests.
22 class AthenaTestBase : public testing::Test {
23 public:
24 AthenaTestBase();
25 ~AthenaTestBase() override;
27 // testing::Test:
28 void SetUp() override;
29 void TearDown() override;
31 protected:
32 void RunAllPendingInMessageLoop();
34 aura::Window* root_window() { return helper_->GetRootWindow(); }
35 aura::WindowTreeHost* host() { return helper_->GetHost(); }
37 private:
38 bool setup_called_;
39 bool teardown_called_;
41 base::MessageLoopForUI message_loop_;
42 scoped_ptr<AthenaTestHelper> helper_;
44 DISALLOW_COPY_AND_ASSIGN(AthenaTestBase);
47 } // namespace test
48 } // namespace athena
50 #endif // ATHENA_TEST_BASE_ATHENA_TEST_BASE_H_