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

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

Issue 1995613003: views/mus: Fix some flaky crashes during test teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-mus-more-focus-fix
Patch Set: . Created 4 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
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/widget/widget_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/views/test/views_test_base.h" 5 #include "ui/views/test/views_test_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "ui/base/clipboard/clipboard.h" 10 #include "ui/base/clipboard/clipboard.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 run_loop.RunUntilIdle(); 61 run_loop.RunUntilIdle();
62 } 62 }
63 63
64 Widget::InitParams ViewsTestBase::CreateParams( 64 Widget::InitParams ViewsTestBase::CreateParams(
65 Widget::InitParams::Type type) { 65 Widget::InitParams::Type type) {
66 Widget::InitParams params(type); 66 Widget::InitParams params(type);
67 params.context = GetContext(); 67 params.context = GetContext();
68 return params; 68 return params;
69 } 69 }
70 70
71 void ViewsTestBase::DisableNativeWidgetMus() {
72 ViewsDelegate::GetInstance()->set_native_widget_factory(
73 ViewsDelegate::NativeWidgetFactory());
74 }
75
76 gfx::NativeWindow ViewsTestBase::GetContext() { 71 gfx::NativeWindow ViewsTestBase::GetContext() {
77 return test_helper_->GetContext(); 72 return test_helper_->GetContext();
78 } 73 }
79 74
80 } // namespace views 75 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698