| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
|
| index 2e1f5dbf3a1b1de25e7fec7b39d132371d205423..eac324b69b19e15c0ff05b4da845251f76ff1986 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #undef None
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/run_loop.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/base/hit_test.h"
|
| @@ -189,6 +190,12 @@ bool ShapeRectContainsPoint(const std::vector<gfx::Rect>& shape_rects,
|
| return false;
|
| }
|
|
|
| +// Flush the message loop.
|
| +void RunAllPendingInMessageLoop() {
|
| + base::RunLoop run_loop;
|
| + run_loop.RunUntilIdle();
|
| +}
|
| +
|
| } // namespace
|
|
|
| class DesktopWindowTreeHostX11Test : public ViewsTestBase {
|
| @@ -263,6 +270,9 @@ TEST_F(DesktopWindowTreeHostX11Test, Shape) {
|
| waiter.Wait();
|
| }
|
|
|
| + // Ensure that the task which is posted when a window is resized is run.
|
| + RunAllPendingInMessageLoop();
|
| +
|
| // xvfb does not support Xrandr so we cannot check the maximized window's
|
| // bounds.
|
| gfx::Rect maximized_bounds;
|
|
|