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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc

Issue 232653002: x11_util: Added GetInnerWindowBounds and GetWindowExtents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile. Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698