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

Side by Side Diff: chrome/test/base/view_event_test_base.cc

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 12 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/test/base/view_event_test_base.h" 5 #include "chrome/test/base/view_event_test_base.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif 9 #endif
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ui_controls::RunClosureAfterAllPendingUIEvents(MessageLoop::QuitClosure()); 85 ui_controls::RunClosureAfterAllPendingUIEvents(MessageLoop::QuitClosure());
86 } 86 }
87 87
88 void ViewEventTestBase::SetUp() { 88 void ViewEventTestBase::SetUp() {
89 #if defined(OS_WIN) 89 #if defined(OS_WIN)
90 OleInitialize(NULL); 90 OleInitialize(NULL);
91 #endif 91 #endif
92 ui::CompositorTestSupport::Initialize(); 92 ui::CompositorTestSupport::Initialize();
93 #if defined(USE_AURA) 93 #if defined(USE_AURA)
94 aura::RootWindow::GetInstance(); 94 aura::RootWindow::GetInstance();
95 aura_shell::Shell::CreateInstance(NULL); 95 ash::Shell::CreateInstance(NULL);
96 #endif 96 #endif
97 window_ = views::Widget::CreateWindow(this); 97 window_ = views::Widget::CreateWindow(this);
98 } 98 }
99 99
100 void ViewEventTestBase::TearDown() { 100 void ViewEventTestBase::TearDown() {
101 if (window_) { 101 if (window_) {
102 #if defined(OS_WIN) 102 #if defined(OS_WIN)
103 DestroyWindow(window_->GetNativeWindow()); 103 DestroyWindow(window_->GetNativeWindow());
104 #else 104 #else
105 window_->Close(); 105 window_->Close();
106 ui_test_utils::RunAllPendingInMessageLoop(); 106 ui_test_utils::RunAllPendingInMessageLoop();
107 #endif 107 #endif
108 window_ = NULL; 108 window_ = NULL;
109 } 109 }
110 #if defined(USE_AURA) 110 #if defined(USE_AURA)
111 aura_shell::Shell::DeleteInstance(); 111 ash::Shell::DeleteInstance();
112 aura::RootWindow::DeleteInstance(); 112 aura::RootWindow::DeleteInstance();
113 #endif 113 #endif
114 ui::CompositorTestSupport::Terminate(); 114 ui::CompositorTestSupport::Terminate();
115 #if defined(OS_WIN) 115 #if defined(OS_WIN)
116 OleUninitialize(); 116 OleUninitialize();
117 #endif 117 #endif
118 } 118 }
119 119
120 bool ViewEventTestBase::CanResize() const { 120 bool ViewEventTestBase::CanResize() const {
121 return true; 121 return true;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 dnd_thread_.reset(NULL); 183 dnd_thread_.reset(NULL);
184 } 184 }
185 185
186 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { 186 void ViewEventTestBase::RunTestMethod(const base::Closure& task) {
187 StopBackgroundThread(); 187 StopBackgroundThread();
188 188
189 task.Run(); 189 task.Run();
190 if (HasFatalFailure()) 190 if (HasFatalFailure())
191 Done(); 191 Done();
192 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698