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

Unified Diff: ui/views/accessible_pane_view_unittest.cc

Issue 2010083002: views/mus: Run some more tests from views_unittests in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessible_pane_view_unittest.cc
diff --git a/ui/views/accessible_pane_view_unittest.cc b/ui/views/accessible_pane_view_unittest.cc
index d3f5bd0d44b7ada293e6327a9724ce5d3635d10e..4473d8c41c4524c0afc872a7a50ea21e8172d22a 100644
--- a/ui/views/accessible_pane_view_unittest.cc
+++ b/ui/views/accessible_pane_view_unittest.cc
@@ -111,6 +111,7 @@ TEST_F(AccessiblePaneViewTest, SetPaneFocusAndRestore) {
widget_main->Init(params_main);
View* root_main = widget_main->GetRootView();
root_main->AddChildView(test_view_main);
+ widget_main->Show();
widget_main->Activate();
test_view_main->GetFocusManager()->SetFocusedView(test_view_main);
EXPECT_TRUE(widget_main->IsActive());
@@ -136,16 +137,19 @@ TEST_F(AccessiblePaneViewTest, SetPaneFocusAndRestore) {
EXPECT_EQ(test_view_bar->child_button(),
test_view_bar->GetWidget()->GetFocusManager()->GetFocusedView());
- // Deactivate() is only reliable on Ash. On Windows it uses ::GetNextWindow()
- // to simply activate another window, and which one is not predictable. On
- // Mac, Deactivate() is not implemented. Note that TestBarView calls
- // set_allow_deactivate_on_esc(true), which is only otherwise used in Ash.
+ if (!IsMus()) {
+ // Deactivate() is only reliable on Ash. On Windows it uses
+ // ::GetNextWindow() to simply activate another window, and which one is not
+ // predictable. On Mac, Deactivate() is not implemented. Note that
+ // TestBarView calls set_allow_deactivate_on_esc(true), which is only
+ // otherwise used in Ash.
#if !defined(OS_MACOSX) || defined(USE_ASH)
- // Esc should deactivate the widget.
- test_view_bar->AcceleratorPressed(test_view_bar->escape_key());
- EXPECT_TRUE(widget_main->IsActive());
- EXPECT_FALSE(widget_bar->IsActive());
+ // Esc should deactivate the widget.
+ test_view_bar->AcceleratorPressed(test_view_bar->escape_key());
+ EXPECT_TRUE(widget_main->IsActive());
+ EXPECT_FALSE(widget_bar->IsActive());
#endif
+ }
widget_bar->CloseNow();
widget_bar.reset();
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698