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

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

Issue 1951223002: MacViews: Fix failing Menu Runner Cocoa Tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit. 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 | « no previous file | chrome/browser/ui/views/menu_test_base.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/ui/views/menu_test_base.h" 7 #include "chrome/browser/ui/views/menu_test_base.h"
8 #include "ui/views/controls/menu/menu_item_view.h" 8 #include "ui/views/controls/menu/menu_item_view.h"
9 #include "ui/views/controls/menu/submenu_view.h" 9 #include "ui/views/controls/menu/submenu_view.h"
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 #if defined(USE_OZONE) 87 #if defined(USE_OZONE)
88 // ozone bringup - http://crbug.com/401304 88 // ozone bringup - http://crbug.com/401304
89 #define MAYBE_NoMatch DISABLED_NoMatch 89 #define MAYBE_NoMatch DISABLED_NoMatch
90 #else 90 #else
91 // If this flakes, disable and log details in http://crbug.com/523255. 91 // If this flakes, disable and log details in http://crbug.com/523255.
92 #define MAYBE_NoMatch NoMatch 92 #define MAYBE_NoMatch NoMatch
93 #endif 93 #endif
94 94
95 VIEW_TEST(MenuControllerMnemonicTestNoMatch, MAYBE_NoMatch); 95 VIEW_TEST(MenuControllerMnemonicTestNoMatch, MAYBE_NoMatch);
96
97 class MenuRunnerCancelTest : public MenuTestBase {
98 public:
99 MenuRunnerCancelTest() {}
100
101 // MenuTestBase overrides:
102 void BuildMenu(views::MenuItemView* menu) override {
103 menu->AppendMenuItemWithLabel(1, base::ASCIIToUTF16("One&/"));
104 menu->AppendMenuItemWithLabel(2, base::ASCIIToUTF16("Two"));
105 }
106
107 void DoTestWithMenuOpen() override {
108 ASSERT_EQ(true, menu_runner()->IsRunning());
109 menu_runner()->Cancel();
110 // On calling Cancel, the nested message loop spun by the menu, should be
111 // marked for termination. However, since we are still in the last
112 // iteration of the nested message loop, MenuRunner::IsRunning(), should
113 // return true.
114 ASSERT_EQ(true, menu_runner()->IsRunning());
115 Done();
116 }
117
118 private:
119 DISALLOW_COPY_AND_ASSIGN(MenuRunnerCancelTest);
120 };
121
122 // Test that MenuRunner::IsRunning() returns true, immediately after calling
123 // MenuRunner::Cancel() for a syncronous menu.
124 VIEW_TEST(MenuRunnerCancelTest, IsRunningAfterCancel);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/menu_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698