OLD | NEW |
(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 #include "athena/test/athena_test_helper.h" |
| 6 #include "base/at_exit.h" |
| 7 #include "base/command_line.h" |
| 8 #include "base/i18n/icu_util.h" |
| 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" |
| 11 #include "ui/aura/window_tree_host.h" |
| 12 #include "ui/compositor/test/context_factories_for_test.h" |
| 13 #include "ui/gl/gl_surface.h" |
| 14 |
| 15 class UIShell { |
| 16 public: |
| 17 explicit UIShell(base::MessageLoopForUI* message_loop) |
| 18 : athena_helper_(message_loop) { |
| 19 const bool enable_pixel_output = true; |
| 20 ui::ContextFactory* factory = |
| 21 ui::InitializeContextFactoryForTests(enable_pixel_output); |
| 22 athena_helper_.SetUp(factory); |
| 23 athena_helper_.host()->Show(); |
| 24 } |
| 25 |
| 26 private: |
| 27 athena::test::AthenaTestHelper athena_helper_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(UIShell); |
| 30 }; |
| 31 |
| 32 int main(int argc, const char **argv) { |
| 33 setlocale(LC_ALL, ""); |
| 34 |
| 35 base::AtExitManager exit_manager; |
| 36 base::CommandLine::Init(argc, argv); |
| 37 base::i18n::InitializeICU(); |
| 38 gfx::GLSurface::InitializeOneOffForTests(); |
| 39 |
| 40 base::MessageLoopForUI message_loop; |
| 41 UIShell shell(&message_loop); |
| 42 base::RunLoop run_loop; |
| 43 run_loop.Run(); |
| 44 } |
OLD | NEW |