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

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

Issue 831643004: MacViews: Fix child window z-order and SetBounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CHECK->EXPECT_TRUE Created 5 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/widget/widget_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 3a3017bf9fe53b5df94e1dcfdfe573e80516551f..6c410fac014076a2a6472bd5225ffe2c1dc9d84f 100644
--- a/ui/views/test/widget_test_mac.mm
+++ b/ui/views/test/widget_test_mac.mm
@@ -27,6 +27,25 @@ bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) {
}
// static
+bool WidgetTest::IsWindowStackedAbove(Widget* above, Widget* below) {
+ EXPECT_TRUE(above->IsVisible());
+ EXPECT_TRUE(below->IsVisible());
+
+ // -[NSApplication orderedWindows] are ordered front-to-back.
+ NSWindow* first = above->GetNativeWindow();
+ NSWindow* second = below->GetNativeWindow();
+
+ for (NSWindow* window in [NSApp orderedWindows]) {
+ if (window == second)
+ return !first;
+
+ if (window == first)
+ first = nil;
+ }
+ return false;
+}
+
+// static
ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) {
return static_cast<internal::RootView*>(widget->GetRootView());
}
« no previous file with comments | « ui/views/test/widget_test_aura.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698