Index: ui/aura/aura_test_base.h |
diff --git a/ui/aura/aura_test_base.h b/ui/aura/aura_test_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f6ad2256534746ec164f7c2bbd4a4fcec3ab711a |
--- /dev/null |
+++ b/ui/aura/aura_test_base.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_TEST_BASE_H_ |
+#define UI_AURA_TEST_BASE_H_ |
+#pragma once |
+ |
+#include "base/compiler_specific.h" |
+#include "base/basictypes.h" |
+#include "base/message_loop.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+namespace aura { |
+ |
+// A base class for aura unit tests. |
+class AuraTestBase : public testing::Test { |
+ public: |
+ AuraTestBase(); |
+ virtual ~AuraTestBase(); |
+ |
+ void RunPendingMessages() { |
+ message_loop_.RunAllPending(); |
+ } |
+ |
+ // testing::Test: |
+ virtual void SetUp() OVERRIDE; |
+ virtual void TearDown() OVERRIDE; |
+ |
+ private: |
+ MessageLoopForUI message_loop_; |
+ bool setup_called_; |
+ bool teardown_called_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AuraTestBase); |
+}; |
+ |
+} // namespace aura |
+ |
+#endif // UI_AURA_TEST_BASE_H_ |