| Index: ui/views/test/widget_test_unittest.cc
|
| diff --git a/ui/views/test/widget_test_unittest.cc b/ui/views/test/widget_test_unittest.cc
|
| index b4d8ea50364dcfb00e521e1fccc117cbaf0b1fdd..05f8c1d770aa541a1345b7f414d51b1a9489048c 100644
|
| --- a/ui/views/test/widget_test_unittest.cc
|
| +++ b/ui/views/test/widget_test_unittest.cc
|
| @@ -9,6 +9,10 @@
|
|
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +#if defined(USE_AURA)
|
| +#include "ui/aura/window.h"
|
| +#endif
|
| +
|
| namespace views {
|
| namespace test {
|
| namespace {
|
| @@ -69,6 +73,16 @@ TEST_F(WidgetTestTest, GetAllWidgets) {
|
| Widget* desktop_child = CreateChildNativeWidgetWithParent(desktop);
|
| ExpectAdd(&expected, desktop_child, "desktop_child");
|
|
|
| +#if defined(USE_AURA)
|
| + // A DesktopWindowTreeHost has both a root aura::Window and a content window.
|
| + // DesktopWindowTreeHostX11::GetAllOpenWindows() returns content windows, so
|
| + // ensure that a Widget parented to the root window is also found.
|
| + Widget* desktop_cousin =
|
| + CreateChildPlatformWidget(desktop->GetNativeView()->GetRootWindow());
|
| + ExpectAdd(&expected, desktop_cousin, "desktop_cousin");
|
| + ExpectClose(&expected, {desktop_cousin}, "desktop_cousin");
|
| +#endif // USE_AURA
|
| +
|
| ExpectClose(&expected, {desktop, desktop_child}, "desktop");
|
| ExpectClose(&expected, {native, native_child}, "native");
|
| ExpectClose(&expected, {platform, platform_child}, "platform");
|
|
|