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

Side by Side Diff: athena/test/base/athena_test_helper.h

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « athena/test/base/athena_test_base.cc ('k') | athena/test/base/athena_test_helper.cc » ('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 #ifndef ATHENA_TEST_BASE_ATHENA_TEST_HELPER_H_
6 #define ATHENA_TEST_BASE_ATHENA_TEST_HELPER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/window_tree_host.h"
11
12 namespace base {
13 class MessageLoopForUI;
14 class Thread;
15 }
16
17 namespace ui {
18 class ContextFactory;
19 class ScopedAnimationDurationScaleMode;
20 }
21
22 namespace aura {
23 class Window;
24 class TestScreen;
25 class WindowTreeHost;
26 namespace client {
27 class FocusClient;
28 }
29 }
30
31 namespace wm {
32 class InputMethodEventFilter;
33 }
34
35 namespace athena {
36 namespace test {
37
38 // A helper class owned by tests that does common initialization required for
39 // Athena use. This class creates a root window with clients and other objects
40 // that are necessary to run test on Athena.
41 class AthenaTestHelper {
42 public:
43 explicit AthenaTestHelper(base::MessageLoopForUI* message_loop);
44 ~AthenaTestHelper();
45
46 // Creates and initializes (shows and sizes) the RootWindow for use in tests.
47 void SetUp(ui::ContextFactory* context_factory);
48
49 // Clean up objects that are created for tests. This also deletes the Env
50 // object.
51 void TearDown();
52
53 // Flushes message loop.
54 void RunAllPendingInMessageLoop();
55
56 aura::Window* GetRootWindow();
57 aura::WindowTreeHost* GetHost();
58
59 private:
60 bool setup_called_;
61 bool teardown_called_;
62
63 base::MessageLoopForUI* message_loop_;
64
65 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
66 scoped_ptr<base::Thread> file_thread_;
67
68 DISALLOW_COPY_AND_ASSIGN(AthenaTestHelper);
69 };
70
71 } // namespace test
72 } // namespace athena
73
74 #endif // ATHENA_TEST_BASE_ATHENA_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « athena/test/base/athena_test_base.cc ('k') | athena/test/base/athena_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698