1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "ui/gfx/geometry/test/rect_test_util.h"
6 
7 namespace gfx {
8 namespace test {
9 
RectContains(const gfx::Rect & outer_rect,const gfx::Rect & inner_rect)10 testing::AssertionResult RectContains(const gfx::Rect& outer_rect,
11                                       const gfx::Rect& inner_rect) {
12   if (outer_rect.Contains(inner_rect)) {
13     return testing::AssertionSuccess()
14            << "outer_rect (" << outer_rect.ToString()
15            << ") does contain inner_rect (" << inner_rect.ToString() << ")";
16   }
17   return testing::AssertionFailure() << "outer_rect (" << outer_rect.ToString()
18                                      << ") does not contain inner_rect ("
19                                      << inner_rect.ToString() << ")";
20 }
21 
22 }  // namespace test
23 }  // namespace gfx
24