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

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

Issue 2728373003: Fixs bug resulting in double event delivery in mus (Closed)
Patch Set: comments Created 3 years, 9 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/platform_test_helper.h ('k') | ui/views/test/views_test_base.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 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Creates a widget of |type| with any platform specific data for use in 42 // Creates a widget of |type| with any platform specific data for use in
43 // cross-platform tests. 43 // cross-platform tests.
44 Widget::InitParams CreateParams(Widget::InitParams::Type type); 44 Widget::InitParams CreateParams(Widget::InitParams::Type type);
45 45
46 bool HasCompositingManager() const; 46 bool HasCompositingManager() const;
47 47
48 // Simulate an OS-level destruction of the native window held by |widget|. 48 // Simulate an OS-level destruction of the native window held by |widget|.
49 void SimulateNativeDestroy(Widget* widget); 49 void SimulateNativeDestroy(Widget* widget);
50 50
51 // When running in mus key events are routed to the ime. Use this to disable
52 // events being routed to ime. If you don't do this you'll need to wait for
53 // ime to ack the event.
sadrul 2017/03/07 03:07:19 Are there any tests that actually does wait for th
sky 2017/03/07 04:58:29 I thought some tests might want to talk to the ser
54 void DisableMusInputMethod(Widget* widget);
55
51 protected: 56 protected:
52 TestViewsDelegate* views_delegate() const { 57 TestViewsDelegate* views_delegate() const {
53 return test_helper_->views_delegate(); 58 return test_helper_->views_delegate();
54 } 59 }
55 60
56 void set_views_delegate(std::unique_ptr<TestViewsDelegate> views_delegate) { 61 void set_views_delegate(std::unique_ptr<TestViewsDelegate> views_delegate) {
57 DCHECK(!setup_called_); 62 DCHECK(!setup_called_);
58 views_delegate_for_setup_.swap(views_delegate); 63 views_delegate_for_setup_.swap(views_delegate);
59 } 64 }
60 65
(...skipping 14 matching lines...) Expand all
75 #if defined(OS_WIN) 80 #if defined(OS_WIN)
76 ui::ScopedOleInitializer ole_initializer_; 81 ui::ScopedOleInitializer ole_initializer_;
77 #endif 82 #endif
78 83
79 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); 84 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase);
80 }; 85 };
81 86
82 } // namespace views 87 } // namespace views
83 88
84 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 89 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ui/views/test/platform_test_helper.h ('k') | ui/views/test/views_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698