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

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

Issue 443553003: MacViews: Split ViewEventTestBase into platform-specific files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 "chrome/test/base/chrome_views_test_helper.h"
6
7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/wm/core/default_activation_client.h"
9 #include "ui/wm/core/wm_state.h"
10
11 namespace {
12
13 // ChromeViewsTestHelper implementation for non-Ash Aura environments.
14 // (use_ash=0, use_aura=1).
15 class ChromeViewsTestHelperAura : public ChromeViewsTestHelper {
tapted 2014/08/05 14:00:26 This is the black sheep of the family.. I don't th
sky 2014/08/06 17:37:44 Maybe check the ozone build? If that doesn't use i
tapted 2014/08/11 12:04:17 Nuked. I think the ozone bot we most care about (l
16 public:
17 ChromeViewsTestHelperAura() {}
18
19 // Overridden from ChromeViewsTestHelper:
20 virtual gfx::NativeWindow PlatformSetUp(
21 ui::ContextFactory* context_factory) OVERRIDE;
22 virtual void PlatformTearDown() OVERRIDE;
23
24 private:
25 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
26 wm::WMState wm_state_;
27
28 DISALLOW_COPY_AND_ASSIGN(ChromeViewsTestHelperAura);
29 };
30
31 gfx::NativeWindow ChromeViewsTestHelperAura::PlatformSetUp(
32 ui::ContextFactory* context_factory) {
33 // Instead of using the ash shell, use an AuraTestHelper to create and manage
34 // the test screen.
35 aura_test_helper_.reset(
36 new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
37 aura_test_helper_->SetUp(context_factory);
38 new wm::DefaultActivationClient(aura_test_helper_->root_window());
39 return aura_test_helper_->root_window();
40 }
41
42 void ChromeViewsTestHelperAura::PlatformTearDown() {
43 aura_test_helper_->TearDown();
44 }
45
46 } // namespace
47
48 // static
49 ChromeViewsTestHelper* ChromeViewsTestHelper::Create() {
50 return new ChromeViewsTestHelperAura();
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698