Skip to content

Commit

Permalink
view-mus: Fix DisableViewDoesNotActivateWidget by adding Show().
Browse files Browse the repository at this point in the history
NWA was allowing invisible widgets to be activated, which
doesn't work in mus.

BUG=678070

Review-Url: https://codereview.chromium.org/2615743003
Cr-Commit-Position: refs/heads/master@{#442705}
  • Loading branch information
eglaysher authored and Commit bot committed Jan 10, 2017
1 parent af210b9 commit 4eff32a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ui/views/widget/widget_interactive_uitest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -998,10 +998,6 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
#endif // defined(USE_AURA)

TEST_F(WidgetTestInteractive, DisableViewDoesNotActivateWidget) {
// TODO: see http://crbug.com/678070 for details.
if (IsMus())
return;

#if defined(OS_WIN)
views_delegate()->set_use_desktop_native_widgets(true);
#endif // !defined(OS_WIN)
Expand All @@ -1017,6 +1013,7 @@ TEST_F(WidgetTestInteractive, DisableViewDoesNotActivateWidget) {
view1->SetFocusBehavior(View::FocusBehavior::ALWAYS);
widget1.GetRootView()->AddChildView(view1);

widget1.Show();
ActivateSync(&widget1);

FocusManager* focus_manager1 = widget1.GetFocusManager();
Expand All @@ -1035,6 +1032,7 @@ TEST_F(WidgetTestInteractive, DisableViewDoesNotActivateWidget) {
view2->SetFocusBehavior(View::FocusBehavior::ALWAYS);
widget2.GetRootView()->AddChildView(view2);

widget2.Show();
ActivateSync(&widget2);
EXPECT_TRUE(widget2.IsActive());
EXPECT_FALSE(widget1.IsActive());
Expand Down

0 comments on commit 4eff32a

Please sign in to comment.