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

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

Issue 9320018: Revert 120092 - Reland 120074 -- Disable animations during aura tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/root_window.h" 11 #include "ui/aura/root_window.h"
12 #include "ui/gfx/compositor/layer_animator.h"
13 12
14 namespace aura { 13 namespace aura {
15 namespace test { 14 namespace test {
16 15
17 AuraTestBase::AuraTestBase() 16 AuraTestBase::AuraTestBase()
18 : setup_called_(false), 17 : setup_called_(false),
19 teardown_called_(false) { 18 teardown_called_(false) {
20 #if defined(OS_WIN) 19 #if defined(OS_WIN)
21 OleInitialize(NULL); 20 OleInitialize(NULL);
22 #endif 21 #endif
23 22
24 RootWindow::GetInstance()->Show(); 23 RootWindow::GetInstance()->Show();
25 RootWindow::GetInstance()->SetHostSize(gfx::Size(600, 600)); 24 RootWindow::GetInstance()->SetHostSize(gfx::Size(600, 600));
26
27 // Disable animations during tests.
28 ui::LayerAnimator::set_disable_animations_for_test(true);
29 } 25 }
30 26
31 AuraTestBase::~AuraTestBase() { 27 AuraTestBase::~AuraTestBase() {
32 #if defined(OS_WIN) 28 #if defined(OS_WIN)
33 OleUninitialize(); 29 OleUninitialize();
34 #endif 30 #endif
35 CHECK(setup_called_) 31 CHECK(setup_called_)
36 << "You have overridden SetUp but never called super class's SetUp"; 32 << "You have overridden SetUp but never called super class's SetUp";
37 CHECK(teardown_called_) 33 CHECK(teardown_called_)
38 << "You have overridden TearDown but never called super class's TearDown"; 34 << "You have overridden TearDown but never called super class's TearDown";
(...skipping 19 matching lines...) Expand all
58 54
59 void AuraTestBase::RunAllPendingInMessageLoop() { 55 void AuraTestBase::RunAllPendingInMessageLoop() {
60 #if !defined(OS_MACOSX) 56 #if !defined(OS_MACOSX)
61 message_loop_.RunAllPendingWithDispatcher( 57 message_loop_.RunAllPendingWithDispatcher(
62 RootWindow::GetInstance()->GetDispatcher()); 58 RootWindow::GetInstance()->GetDispatcher());
63 #endif 59 #endif
64 } 60 }
65 61
66 } // namespace test 62 } // namespace test
67 } // namespace aura 63 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698