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

Side by Side Diff: athena/test/athena_test_helper.cc

Issue 311113005: AppModelBuilder to athena. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "athena/test/athena_test_helper.h" 5 #include "athena/test/athena_test_helper.h"
6 6
7 #include "athena/main/athena_launcher.h" 7 #include "athena/main/athena_launcher.h"
8 #include "athena/test/sample_activity_factory.h" 8 #include "athena/test/sample_activity_factory.h"
9 #include "athena/test/test_app_model_builder.h"
9 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 11 #include "base/run_loop.h"
11 #include "ui/aura/client/aura_constants.h" 12 #include "ui/aura/client/aura_constants.h"
12 #include "ui/aura/env.h" 13 #include "ui/aura/env.h"
13 #include "ui/aura/input_state_lookup.h" 14 #include "ui/aura/input_state_lookup.h"
14 #include "ui/aura/test/env_test_helper.h" 15 #include "ui/aura/test/env_test_helper.h"
15 #include "ui/aura/test/test_focus_client.h" 16 #include "ui/aura/test/test_focus_client.h"
16 #include "ui/aura/test/test_screen.h" 17 #include "ui/aura/test/test_screen.h"
17 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
18 #include "ui/base/ime/input_method_initializer.h" 19 #include "ui/base/ime/input_method_initializer.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // TODO(oshima): Switch to athena implementation. 72 // TODO(oshima): Switch to athena implementation.
72 focus_client_.reset(new aura::test::TestFocusClient); 73 focus_client_.reset(new aura::test::TestFocusClient);
73 aura::client::SetFocusClient(root_window(), 74 aura::client::SetFocusClient(root_window(),
74 focus_client_.get()); 75 focus_client_.get());
75 new ::wm::DefaultActivationClient(root_window()); 76 new ::wm::DefaultActivationClient(root_window());
76 77
77 root_window()->Show(); 78 root_window()->Show();
78 // Ensure width != height so tests won't confuse them. 79 // Ensure width != height so tests won't confuse them.
79 host()->SetBounds(gfx::Rect(800, 600)); 80 host()->SetBounds(gfx::Rect(800, 600));
80 81
81 athena::StartAthena(root_window(), new SampleActivityFactory()); 82 athena::StartAthena(root_window(),
83 new SampleActivityFactory(),
84 new TestAppModelBuilder());
82 } 85 }
83 86
84 void AthenaTestHelper::TearDown() { 87 void AthenaTestHelper::TearDown() {
85 teardown_called_ = true; 88 teardown_called_ = true;
86 89
87 athena::ShutdownAthena(); 90 athena::ShutdownAthena();
88 91
89 aura::client::SetFocusClient(root_window(), NULL); 92 aura::client::SetFocusClient(root_window(), NULL);
90 focus_client_.reset(); 93 focus_client_.reset();
91 input_method_filter_.reset(); 94 input_method_filter_.reset();
(...skipping 14 matching lines...) Expand all
106 109
107 void AthenaTestHelper::RunAllPendingInMessageLoop() { 110 void AthenaTestHelper::RunAllPendingInMessageLoop() {
108 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them 111 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
109 // use run_loop.QuitClosure(). 112 // use run_loop.QuitClosure().
110 base::RunLoop run_loop; 113 base::RunLoop run_loop;
111 run_loop.RunUntilIdle(); 114 run_loop.RunUntilIdle();
112 } 115 }
113 116
114 } // namespace test 117 } // namespace test
115 } // namespace athena 118 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698