| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // Get rid of X11 macros which conflict with gtest. | 10 // Get rid of X11 macros which conflict with gtest. |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // when |widget1| is maximized. | 259 // when |widget1| is maximized. |
| 260 { | 260 { |
| 261 WMStateWaiter waiter(xid1, "_NET_WM_STATE_MAXIMIZED_VERT", true); | 261 WMStateWaiter waiter(xid1, "_NET_WM_STATE_MAXIMIZED_VERT", true); |
| 262 widget1->Maximize(); | 262 widget1->Maximize(); |
| 263 waiter.Wait(); | 263 waiter.Wait(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 // xvfb does not support Xrandr so we cannot check the maximized window's | 266 // xvfb does not support Xrandr so we cannot check the maximized window's |
| 267 // bounds. | 267 // bounds. |
| 268 gfx::Rect maximized_bounds; | 268 gfx::Rect maximized_bounds; |
| 269 ui::GetWindowRect(xid1, &maximized_bounds); | 269 ui::GetOuterWindowBounds(xid1, &maximized_bounds); |
| 270 | 270 |
| 271 shape_rects = GetShapeRects(xid1); | 271 shape_rects = GetShapeRects(xid1); |
| 272 ASSERT_FALSE(shape_rects.empty()); | 272 ASSERT_FALSE(shape_rects.empty()); |
| 273 EXPECT_TRUE(ShapeRectContainsPoint(shape_rects, | 273 EXPECT_TRUE(ShapeRectContainsPoint(shape_rects, |
| 274 maximized_bounds.width() - 1, | 274 maximized_bounds.width() - 1, |
| 275 5)); | 275 5)); |
| 276 EXPECT_TRUE(ShapeRectContainsPoint(shape_rects, | 276 EXPECT_TRUE(ShapeRectContainsPoint(shape_rects, |
| 277 maximized_bounds.width() - 1, | 277 maximized_bounds.width() - 1, |
| 278 15)); | 278 15)); |
| 279 } | 279 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 SubstructureRedirectMask | SubstructureNotifyMask, | 452 SubstructureRedirectMask | SubstructureNotifyMask, |
| 453 &xevent); | 453 &xevent); |
| 454 | 454 |
| 455 WMStateWaiter waiter(xid, "_NET_WM_STATE_FOCUSED", true); | 455 WMStateWaiter waiter(xid, "_NET_WM_STATE_FOCUSED", true); |
| 456 waiter.Wait(); | 456 waiter.Wait(); |
| 457 } | 457 } |
| 458 EXPECT_TRUE(widget.GetNativeWindow()->IsVisible()); | 458 EXPECT_TRUE(widget.GetNativeWindow()->IsVisible()); |
| 459 } | 459 } |
| 460 | 460 |
| 461 } // namespace views | 461 } // namespace views |
| OLD | NEW |