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

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 years 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 | « ui/aura/test/aura_test_base.h ('k') | ui/aura/test/test_windows.h » ('j') | 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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/test/aura_test_helper.h" 7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/aura/window.h"
8 #include "ui/base/gestures/gesture_configuration.h" 9 #include "ui/base/gestures/gesture_configuration.h"
9 #include "ui/base/ime/text_input_test_support.h" 10 #include "ui/base/ime/text_input_test_support.h"
10 11
11 namespace aura { 12 namespace aura {
12 namespace test { 13 namespace test {
13 14
14 AuraTestBase::AuraTestBase() { 15 AuraTestBase::AuraTestBase() {
15 } 16 }
16 17
17 AuraTestBase::~AuraTestBase() { 18 AuraTestBase::~AuraTestBase() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void AuraTestBase::TearDown() { 62 void AuraTestBase::TearDown() {
62 // Flush the message loop because we have pending release tasks 63 // Flush the message loop because we have pending release tasks
63 // and these tasks if un-executed would upset Valgrind. 64 // and these tasks if un-executed would upset Valgrind.
64 RunAllPendingInMessageLoop(); 65 RunAllPendingInMessageLoop();
65 66
66 helper_->TearDown(); 67 helper_->TearDown();
67 ui::TextInputTestSupport::Shutdown(); 68 ui::TextInputTestSupport::Shutdown();
68 testing::Test::TearDown(); 69 testing::Test::TearDown();
69 } 70 }
70 71
72 Window* AuraTestBase::CreateTransientChild(int id, Window* parent) {
73 Window* window = new Window(NULL);
74 window->set_id(id);
75 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
76 window->Init(ui::LAYER_TEXTURED);
77 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect());
78 parent->AddTransientChild(window);
79 return window;
80 }
81
82 void AuraTestBase::SetDefaultParentByPrimaryRootWindow(aura::Window* window) {
83 window->SetDefaultParentByRootWindow(root_window(), gfx::Rect());
84 }
85
71 void AuraTestBase::RunAllPendingInMessageLoop() { 86 void AuraTestBase::RunAllPendingInMessageLoop() {
72 helper_->RunAllPendingInMessageLoop(); 87 helper_->RunAllPendingInMessageLoop();
73 } 88 }
74 89
75 } // namespace test 90 } // namespace test
76 } // namespace aura 91 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.h ('k') | ui/aura/test/test_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698