| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "ash/test/test_metro_viewer_process_host.h" | 42 #include "ash/test/test_metro_viewer_process_host.h" |
| 43 #include "base/test/test_process_killer_win.h" | 43 #include "base/test/test_process_killer_win.h" |
| 44 #include "base/win/metro.h" | 44 #include "base/win/metro.h" |
| 45 #include "base/win/windows_version.h" | 45 #include "base/win/windows_version.h" |
| 46 #include "ui/aura/remote_window_tree_host_win.h" | 46 #include "ui/aura/remote_window_tree_host_win.h" |
| 47 #include "ui/aura/window_tree_host_win.h" | 47 #include "ui/aura/window_tree_host_win.h" |
| 48 #include "win8/test/test_registrar_constants.h" | 48 #include "win8/test/test_registrar_constants.h" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 #if defined(USE_X11) | 51 #if defined(USE_X11) |
| 52 #include <X11/Xlib.h> | 52 #include "ui/gfx/x/x11_connection.h" |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 namespace ash { | 55 namespace ash { |
| 56 namespace test { | 56 namespace test { |
| 57 namespace { | 57 namespace { |
| 58 | 58 |
| 59 class AshEventGeneratorDelegate : public aura::test::EventGeneratorDelegate { | 59 class AshEventGeneratorDelegate : public aura::test::EventGeneratorDelegate { |
| 60 public: | 60 public: |
| 61 AshEventGeneratorDelegate() {} | 61 AshEventGeneratorDelegate() {} |
| 62 virtual ~AshEventGeneratorDelegate() {} | 62 virtual ~AshEventGeneratorDelegate() {} |
| (...skipping 28 matching lines...) Expand all Loading... |
| 91 ///////////////////////////////////////////////////////////////////////////// | 91 ///////////////////////////////////////////////////////////////////////////// |
| 92 | 92 |
| 93 AshTestBase::AshTestBase() | 93 AshTestBase::AshTestBase() |
| 94 : setup_called_(false), | 94 : setup_called_(false), |
| 95 teardown_called_(false), | 95 teardown_called_(false), |
| 96 start_session_(true) { | 96 start_session_(true) { |
| 97 #if defined(USE_X11) | 97 #if defined(USE_X11) |
| 98 // This is needed for tests which use this base class but are run in browser | 98 // This is needed for tests which use this base class but are run in browser |
| 99 // test binaries so don't get the default initialization in the unit test | 99 // test binaries so don't get the default initialization in the unit test |
| 100 // suite. | 100 // suite. |
| 101 XInitThreads(); | 101 gfx::InitializeThreadedX11(); |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 thread_bundle_.reset(new content::TestBrowserThreadBundle); | 104 thread_bundle_.reset(new content::TestBrowserThreadBundle); |
| 105 // Must initialize |ash_test_helper_| here because some tests rely on | 105 // Must initialize |ash_test_helper_| here because some tests rely on |
| 106 // AshTestBase methods before they call AshTestBase::SetUp(). | 106 // AshTestBase methods before they call AshTestBase::SetUp(). |
| 107 ash_test_helper_.reset(new AshTestHelper(base::MessageLoopForUI::current())); | 107 ash_test_helper_.reset(new AshTestHelper(base::MessageLoopForUI::current())); |
| 108 } | 108 } |
| 109 | 109 |
| 110 AshTestBase::~AshTestBase() { | 110 AshTestBase::~AshTestBase() { |
| 111 CHECK(setup_called_) | 111 CHECK(setup_called_) |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 void AshTestBase::UnblockUserSession() { | 343 void AshTestBase::UnblockUserSession() { |
| 344 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 344 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 345 SetSessionStarted(true); | 345 SetSessionStarted(true); |
| 346 SetUserAddingScreenRunning(false); | 346 SetUserAddingScreenRunning(false); |
| 347 } | 347 } |
| 348 | 348 |
| 349 | 349 |
| 350 } // namespace test | 350 } // namespace test |
| 351 } // namespace ash | 351 } // namespace ash |
| OLD | NEW |