| 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());
|
| }
|
|
|