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

Side by Side Diff: ui/views/test/views_test_helper_aura.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/views/test/views_test_helper_aura.h ('k') | ui/views/test/views_test_helper_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/test/views_test_helper_aura.h"
6
7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/wm/core/capture_controller.h"
9 #include "ui/wm/core/default_activation_client.h"
10 #include "ui/wm/core/wm_state.h"
11
12 namespace views {
13
14 // static
15 ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop,
16 ui::ContextFactory* context_factory) {
17 return new ViewsTestHelperAura(message_loop, context_factory);
18 }
19
20 ViewsTestHelperAura::ViewsTestHelperAura(base::MessageLoopForUI* message_loop,
21 ui::ContextFactory* context_factory)
22 : context_factory_(context_factory) {
23 aura_test_helper_.reset(new aura::test::AuraTestHelper(message_loop));
24 }
25
26 ViewsTestHelperAura::~ViewsTestHelperAura() {
27 }
28
29 void ViewsTestHelperAura::SetUp() {
30 aura_test_helper_->SetUp(context_factory_);
31 new wm::DefaultActivationClient(aura_test_helper_->root_window());
32 wm_state_.reset(new wm::WMState);
33 }
34
35 void ViewsTestHelperAura::TearDown() {
36 aura_test_helper_->TearDown();
37 wm_state_.reset();
38 CHECK(!wm::ScopedCaptureClient::IsActive());
39 }
40
41 gfx::NativeWindow ViewsTestHelperAura::GetContext() {
42 return aura_test_helper_->root_window();
43 }
44
45 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_helper_aura.h ('k') | ui/views/test/views_test_helper_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698