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

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

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years, 2 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif 9 #endif
10 10
11 #include "ui/aura/desktop.h" 11 #include "ui/aura/desktop.h"
12 #include "ui/aura/test/test_desktop_delegate.h" 12 #include "ui/aura/test/test_desktop_delegate.h"
13 #include "ui/gfx/compositor/test_compositor.h" 13 #include "ui/gfx/compositor/test_compositor.h"
14 14
15 namespace aura { 15 namespace aura {
16 namespace test { 16 namespace test {
17 17
18 static ui::Compositor* TestCreateCompositor() { 18 static ui::Compositor* TestCreateCompositor(ui::CompositorDelegate* owner) {
19 return new ui::TestCompositor(); 19 return new ui::TestCompositor(owner);
20 } 20 }
21 21
22 AuraTestBase::AuraTestBase() 22 AuraTestBase::AuraTestBase()
23 : setup_called_(false), 23 : setup_called_(false),
24 teardown_called_(false) { 24 teardown_called_(false) {
25 #if defined(OS_WIN) 25 #if defined(OS_WIN)
26 OleInitialize(NULL); 26 OleInitialize(NULL);
27 #endif 27 #endif
28 } 28 }
29 29
(...skipping 21 matching lines...) Expand all
51 // Flush the message loop because we have pending release tasks 51 // Flush the message loop because we have pending release tasks
52 // and these tasks if un-executed would upset Valgrind. 52 // and these tasks if un-executed would upset Valgrind.
53 RunPendingMessages(); 53 RunPendingMessages();
54 teardown_called_ = true; 54 teardown_called_ = true;
55 testing::Test::TearDown(); 55 testing::Test::TearDown();
56 aura::Desktop::set_compositor_factory_for_testing(NULL); 56 aura::Desktop::set_compositor_factory_for_testing(NULL);
57 } 57 }
58 58
59 } // namespace test 59 } // namespace test
60 } // namespace aura 60 } // namespace aura
OLDNEW
« ui/aura/desktop.h ('K') | « ui/aura/desktop.cc ('k') | ui/gfx/compositor/test_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698