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

Side by Side Diff: chrome/browser/ui/views/button_dropdown_test.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/test/base/interactive_test_utils.h" 7 #include "chrome/test/base/interactive_test_utils.h"
8 #include "chrome/test/base/ui_controls.h" 8 #include "chrome/test/base/ui_controls.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "chrome/test/base/view_event_test_base.h" 10 #include "chrome/test/base/view_event_test_base.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 button_, 106 button_,
107 ui_controls::LEFT, 107 ui_controls::LEFT,
108 ui_controls::DOWN | ui_controls::UP, 108 ui_controls::DOWN | ui_controls::UP,
109 CreateEventTask(this, &ButtonDropDownDragTest::Step4)); 109 CreateEventTask(this, &ButtonDropDownDragTest::Step4));
110 } 110 }
111 111
112 void Step4() { 112 void Step4() {
113 // One more hop is required because ui::SimpleMenuModel calls 113 // One more hop is required because ui::SimpleMenuModel calls
114 // ui::SimpleMenuModel::Delegate::MenuClosed() via a posted 114 // ui::SimpleMenuModel::Delegate::MenuClosed() via a posted
115 // task. 115 // task.
116 MessageLoopForUI::current()->PostTask( 116 base::MessageLoopForUI::current()->PostTask(
117 FROM_HERE, 117 FROM_HERE, CreateEventTask(this, &ButtonDropDownDragTest::Step5));
118 CreateEventTask(this, &ButtonDropDownDragTest::Step5));
119 } 118 }
120 119
121 void Step5() { 120 void Step5() {
122 ASSERT_TRUE(menu_closed_); 121 ASSERT_TRUE(menu_closed_);
123 Done(); 122 Done();
124 } 123 }
125 124
126 private: 125 private:
127 views::ButtonDropDown* button_; 126 views::ButtonDropDown* button_;
128 bool menu_shown_; 127 bool menu_shown_;
129 bool menu_closed_; 128 bool menu_closed_;
130 }; 129 };
131 130
132 #if defined(OS_WIN) 131 #if defined(OS_WIN)
133 #define MAYBE_DragActivation DISABLED_DragActivation 132 #define MAYBE_DragActivation DISABLED_DragActivation
134 #else 133 #else
135 #define MAYBE_DragActivation DragActivation 134 #define MAYBE_DragActivation DragActivation
136 #endif 135 #endif
137 VIEW_TEST(ButtonDropDownDragTest, MAYBE_DragActivation) 136 VIEW_TEST(ButtonDropDownDragTest, MAYBE_DragActivation)
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698