| Index: ui/aura/mus/window_tree_client_unittest.cc
|
| diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
|
| index fbfcb94487adfe6c7a99ae05bd163d5954415e64..2643860e9feb11d97e530513b0d318f632ee3ae4 100644
|
| --- a/ui/aura/mus/window_tree_client_unittest.cc
|
| +++ b/ui/aura/mus/window_tree_client_unittest.cc
|
| @@ -22,6 +22,7 @@
|
| #include "ui/aura/client/focus_client.h"
|
| #include "ui/aura/client/transient_window_client.h"
|
| #include "ui/aura/mus/capture_synchronizer.h"
|
| +#include "ui/aura/mus/focus_synchronizer.h"
|
| #include "ui/aura/mus/property_converter.h"
|
| #include "ui/aura/mus/window_mus.h"
|
| #include "ui/aura/mus/window_tree_client_delegate.h"
|
| @@ -1031,11 +1032,19 @@ TEST_F(WindowTreeClientWmTest, SetFocusFailed) {
|
| Window child(nullptr);
|
| child.Init(ui::LAYER_NOT_DRAWN);
|
| root_window()->AddChild(&child);
|
| + // AuraTestHelper::SetUp sets the active focus client and focus client root,
|
| + // root_window() is assumed to have focus until we actually focus on a
|
| + // certain window.
|
| + EXPECT_EQ(WindowMus::Get(root_window()),
|
| + window_tree_client_impl()->focus_synchronizer()->focused_window());
|
| child.Focus();
|
| ASSERT_TRUE(child.HasFocus());
|
| + EXPECT_EQ(&child, client::GetFocusClient(&child)->GetFocusedWindow());
|
| ASSERT_TRUE(
|
| window_tree()->AckSingleChangeOfType(WindowTreeChangeType::FOCUS, false));
|
| - EXPECT_EQ(nullptr, client::GetFocusClient(&child)->GetFocusedWindow());
|
| + // If the change failed, we fall back to the revert_value which is the
|
| + // current focused_window.
|
| + EXPECT_EQ(root_window(), client::GetFocusClient(&child)->GetFocusedWindow());
|
| }
|
|
|
| // Simulates a focus change, and while the focus change is in flight the server
|
|
|