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

Unified Diff: ui/views/test/widget_test_unittest.cc

Issue 2663163004: Run the "Relaunch Chrome" dialog test everywhere. (Closed)
Patch Set: respond to comments Created 3 years, 10 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/test/widget_test_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « ui/views/test/widget_test_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698