| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "ui/base/resource/resource_bundle.h" | 7 #include "ui/base/resource/resource_bundle.h" |
| 8 #include "ui/base/ui_base_paths.h" | 8 #include "ui/base/ui_base_paths.h" |
| 9 #include "ui/test/test_suite.h" | 9 #include "ui/test/test_suite.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| 11 | 11 |
| 12 #if defined(TOOLKIT_VIEWS) | |
| 13 #include "ui/compositor/compositor_setup.h" | |
| 14 #endif | |
| 15 | |
| 16 class MessageCenterTestSuite : public ui::test::UITestSuite { | 12 class MessageCenterTestSuite : public ui::test::UITestSuite { |
| 17 public: | 13 public: |
| 18 MessageCenterTestSuite(int argc, char** argv) | 14 MessageCenterTestSuite(int argc, char** argv) |
| 19 : ui::test::UITestSuite(argc, argv) { | 15 : ui::test::UITestSuite(argc, argv) { |
| 20 } | 16 } |
| 21 | 17 |
| 22 protected: | 18 protected: |
| 23 virtual void Initialize() OVERRIDE; | 19 virtual void Initialize() OVERRIDE; |
| 24 virtual void Shutdown() OVERRIDE; | 20 virtual void Shutdown() OVERRIDE; |
| 25 | 21 |
| 26 private: | 22 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(MessageCenterTestSuite); | 23 DISALLOW_COPY_AND_ASSIGN(MessageCenterTestSuite); |
| 28 }; | 24 }; |
| 29 | 25 |
| 30 void MessageCenterTestSuite::Initialize() { | 26 void MessageCenterTestSuite::Initialize() { |
| 31 ui::test::UITestSuite::Initialize(); | 27 ui::test::UITestSuite::Initialize(); |
| 32 | |
| 33 #if defined(TOOLKIT_VIEWS) | |
| 34 ui::SetupTestCompositor(); | |
| 35 #endif | |
| 36 } | 28 } |
| 37 | 29 |
| 38 void MessageCenterTestSuite::Shutdown() { | 30 void MessageCenterTestSuite::Shutdown() { |
| 39 ui::test::UITestSuite::Shutdown(); | 31 ui::test::UITestSuite::Shutdown(); |
| 40 } | 32 } |
| 41 | 33 |
| 42 int main(int argc, char** argv) { | 34 int main(int argc, char** argv) { |
| 43 return MessageCenterTestSuite(argc, argv).Run(); | 35 return MessageCenterTestSuite(argc, argv).Run(); |
| 44 } | 36 } |
| OLD | NEW |