Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: ash/test/ash_test_base.cc

Issue 10829180: Move cursor when it's hidden so that UX can update correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable test for windows Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/aura/env.h » ('j') | ui/aura/env.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 AshTestBase::~AshTestBase() { 52 AshTestBase::~AshTestBase() {
53 } 53 }
54 54
55 void AshTestBase::SetUp() { 55 void AshTestBase::SetUp() {
56 ui::TextInputTestSupport::Initilaize(); 56 ui::TextInputTestSupport::Initilaize();
57 // Creates Shell and hook with Desktop. 57 // Creates Shell and hook with Desktop.
58 TestShellDelegate* delegate = new TestShellDelegate; 58 TestShellDelegate* delegate = new TestShellDelegate;
59 ash::Shell::CreateInstance(delegate); 59 ash::Shell::CreateInstance(delegate);
60 Shell::GetPrimaryRootWindow()->Show(); 60 Shell::GetPrimaryRootWindow()->Show();
61 Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(800, 600)); 61 Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(800, 600));
62 Shell::GetInstance()->cursor_manager()->ShowCursor(true);
62 63
63 // Disable animations during tests. 64 // Disable animations during tests.
64 ui::LayerAnimator::set_disable_animations_for_test(true); 65 ui::LayerAnimator::set_disable_animations_for_test(true);
65 } 66 }
66 67
67 void AshTestBase::TearDown() { 68 void AshTestBase::TearDown() {
68 // Flush the message loop to finish pending release tasks. 69 // Flush the message loop to finish pending release tasks.
69 RunAllPendingInMessageLoop(); 70 RunAllPendingInMessageLoop();
70 71
71 // Tear down the shell. 72 // Tear down the shell.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void AshTestBase::RunAllPendingInMessageLoop() { 108 void AshTestBase::RunAllPendingInMessageLoop() {
108 #if !defined(OS_MACOSX) 109 #if !defined(OS_MACOSX)
109 DCHECK(MessageLoopForUI::current() == &message_loop_); 110 DCHECK(MessageLoopForUI::current() == &message_loop_);
110 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 111 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
111 run_loop.RunUntilIdle(); 112 run_loop.RunUntilIdle();
112 #endif 113 #endif
113 } 114 }
114 115
115 } // namespace test 116 } // namespace test
116 } // namespace ash 117 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ui/aura/env.h » ('j') | ui/aura/env.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698