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

Unified Diff: ui/views/test/widget_test_mac.mm

Issue 2660813002: Add WidgetTest::GetAllWidgets() to find dialogs created by TestBrowserDialog. (Closed)
Patch Set: respond to comments Created 3 years, 11 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') | ui/views/test/widget_test_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/widget_test_mac.mm
diff --git a/ui/views/test/widget_test_mac.mm b/ui/views/test/widget_test_mac.mm
index 5b3f9e5bb3b849a8569ca8e2abac946dc9345312..2f14759dade34a82a0fa1ac3f1bf58224bacb5f8 100644
--- a/ui/views/test/widget_test_mac.mm
+++ b/ui/views/test/widget_test_mac.mm
@@ -85,5 +85,15 @@ bool WidgetTest::IsNativeWindowTransparent(gfx::NativeWindow window) {
return ![window isOpaque];
}
+// static
+Widget::Widgets WidgetTest::GetAllWidgets() {
+ Widget::Widgets all_widgets;
+ for (NSWindow* window : [NSApp windows]) {
+ if (Widget* widget = Widget::GetWidgetForNativeWindow(window))
+ all_widgets.insert(widget);
+ }
+ return all_widgets;
+}
+
} // namespace test
} // namespace views
« no previous file with comments | « ui/views/test/widget_test_aura.cc ('k') | ui/views/test/widget_test_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698