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

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

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 6 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 | « chrome/browser/ui/webui/feedback_ui.cc ('k') | no next file » | no next file with comments »
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 "chrome/test/base/view_event_test_base.h" 5 #include "chrome/test/base/view_event_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // executed before UI events are executed. 80 // executed before UI events are executed.
81 ui_controls::RunClosureAfterAllPendingUIEvents(MessageLoop::QuitClosure()); 81 ui_controls::RunClosureAfterAllPendingUIEvents(MessageLoop::QuitClosure());
82 } 82 }
83 83
84 void ViewEventTestBase::SetUp() { 84 void ViewEventTestBase::SetUp() {
85 ui::CompositorTestSupport::Initialize(); 85 ui::CompositorTestSupport::Initialize();
86 #if defined(USE_ASH) 86 #if defined(USE_ASH)
87 ash::Shell::CreateInstance(NULL); 87 ash::Shell::CreateInstance(NULL);
88 // The shell runs with a locked screen in tests, so we must clear the event 88 // The shell runs with a locked screen in tests, so we must clear the event
89 // client so it doesn't interfere with event propagation. 89 // client so it doesn't interfere with event propagation.
90 aura::client::SetEventClient(ash::Shell::GetInstance()->GetRootWindow(), 90 aura::client::SetEventClient(ash::Shell::GetPrimaryRootWindow(),
91 NULL); 91 NULL);
92 #endif 92 #endif
93 window_ = views::Widget::CreateWindow(this); 93 window_ = views::Widget::CreateWindow(this);
94 } 94 }
95 95
96 void ViewEventTestBase::TearDown() { 96 void ViewEventTestBase::TearDown() {
97 if (window_) { 97 if (window_) {
98 #if defined(OS_WIN) && !defined(USE_AURA) 98 #if defined(OS_WIN) && !defined(USE_AURA)
99 DestroyWindow(window_->GetNativeWindow()); 99 DestroyWindow(window_->GetNativeWindow());
100 #else 100 #else
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 dnd_thread_.reset(NULL); 178 dnd_thread_.reset(NULL);
179 } 179 }
180 180
181 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { 181 void ViewEventTestBase::RunTestMethod(const base::Closure& task) {
182 StopBackgroundThread(); 182 StopBackgroundThread();
183 183
184 task.Run(); 184 task.Run();
185 if (HasFatalFailure()) 185 if (HasFatalFailure())
186 Done(); 186 Done();
187 } 187 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698