| 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/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/test/test_shell_delegate.h" | 11 #include "ash/test/test_shell_delegate.h" |
| 12 #include "base/run_loop.h" |
| 12 #include "base/string_split.h" | 13 #include "base/string_split.h" |
| 13 #include "content/public/test/web_contents_tester.h" | 14 #include "content/public/test/web_contents_tester.h" |
| 14 #include "ui/aura/env.h" | 15 #include "ui/aura/env.h" |
| 15 #include "ui/aura/monitor_manager.h" | 16 #include "ui/aura/monitor_manager.h" |
| 16 #include "ui/aura/root_window.h" | 17 #include "ui/aura/root_window.h" |
| 17 #include "ui/base/ime/text_input_test_support.h" | 18 #include "ui/base/ime/text_input_test_support.h" |
| 18 #include "ui/compositor/layer_animator.h" | 19 #include "ui/compositor/layer_animator.h" |
| 19 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
| 20 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
| 21 | 22 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 84 } |
| 84 | 85 |
| 85 void AshTestBase::UpdateMonitor(const std::string& display_specs) { | 86 void AshTestBase::UpdateMonitor(const std::string& display_specs) { |
| 86 std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs); | 87 std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs); |
| 87 aura::Env::GetInstance()->monitor_manager()-> | 88 aura::Env::GetInstance()->monitor_manager()-> |
| 88 OnNativeMonitorsChanged(displays); | 89 OnNativeMonitorsChanged(displays); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void AshTestBase::RunAllPendingInMessageLoop() { | 92 void AshTestBase::RunAllPendingInMessageLoop() { |
| 92 #if !defined(OS_MACOSX) | 93 #if !defined(OS_MACOSX) |
| 93 message_loop_.RunAllPendingWithDispatcher( | 94 DCHECK(MessageLoopForUI::current() == &message_loop_); |
| 94 aura::Env::GetInstance()->GetDispatcher()); | 95 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); |
| 96 run_loop.RunUntilIdle(); |
| 95 #endif | 97 #endif |
| 96 } | 98 } |
| 97 | 99 |
| 98 } // namespace test | 100 } // namespace test |
| 99 } // namespace ash | 101 } // namespace ash |
| OLD | NEW |