OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 UI_AURA_TEST_BASE_H_ |
| 6 #define UI_AURA_TEST_BASE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/basictypes.h" |
| 11 #include "base/message_loop.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 |
| 14 namespace aura { |
| 15 |
| 16 // A base class for aura unit tests. |
| 17 class AuraTestBase : public testing::Test { |
| 18 public: |
| 19 AuraTestBase(); |
| 20 virtual ~AuraTestBase(); |
| 21 |
| 22 void RunPendingMessages() { |
| 23 message_loop_.RunAllPending(); |
| 24 } |
| 25 |
| 26 // testing::Test: |
| 27 virtual void SetUp() OVERRIDE; |
| 28 virtual void TearDown() OVERRIDE; |
| 29 |
| 30 private: |
| 31 MessageLoopForUI message_loop_; |
| 32 bool setup_called_; |
| 33 bool teardown_called_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); |
| 36 }; |
| 37 |
| 38 } // namespace aura |
| 39 |
| 40 #endif // UI_AURA_TEST_BASE_H_ |
OLD | NEW |