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

Side by Side Diff: ui/views/test/views_test_base.cc

Issue 10399134: cros: Maybe fix recent failures on trunk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « content/test/test_renderer_host.cc ('k') | no next file » | 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/views/test/views_test_base.h" 5 #include "ui/views/test/views_test_base.h"
6 6
7 #if defined(USE_AURA) 7 #if defined(USE_AURA)
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Flush the message loop because we have pending release tasks 59 // Flush the message loop because we have pending release tasks
60 // and these tasks if un-executed would upset Valgrind. 60 // and these tasks if un-executed would upset Valgrind.
61 RunPendingMessages(); 61 RunPendingMessages();
62 teardown_called_ = true; 62 teardown_called_ = true;
63 views_delegate_.reset(); 63 views_delegate_.reset();
64 testing::Test::TearDown(); 64 testing::Test::TearDown();
65 #if defined(USE_AURA) 65 #if defined(USE_AURA)
66 test_stacking_client_.reset(); 66 test_stacking_client_.reset();
67 test_activation_client_.reset(); 67 test_activation_client_.reset();
68 root_window_.reset(); 68 root_window_.reset();
69 aura::Env::DeleteInstance();
69 #endif 70 #endif
70 } 71 }
71 72
72 void ViewsTestBase::RunPendingMessages() { 73 void ViewsTestBase::RunPendingMessages() {
73 #if defined(USE_AURA) 74 #if defined(USE_AURA)
74 message_loop_.RunAllPendingWithDispatcher( 75 message_loop_.RunAllPendingWithDispatcher(
75 aura::Env::GetInstance()->GetDispatcher()); 76 aura::Env::GetInstance()->GetDispatcher());
76 #else 77 #else
77 message_loop_.RunAllPending(); 78 message_loop_.RunAllPending();
78 #endif 79 #endif
79 } 80 }
80 81
81 } // namespace views 82 } // namespace views
OLDNEW
« no previous file with comments | « content/test/test_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698