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

Side by Side Diff: ui/views/bubble/bubble_border_unittest.cc

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/bubble/bubble_border.h" 5 #include "ui/views/bubble/bubble_border.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "ui/gfx/geometry/rect.h"
9 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
10 11
11 namespace views { 12 namespace views {
12 13
13 typedef views::ViewsTestBase BubbleBorderTest; 14 typedef views::ViewsTestBase BubbleBorderTest;
14 15
15 TEST_F(BubbleBorderTest, GetMirroredArrow) { 16 TEST_F(BubbleBorderTest, GetMirroredArrow) {
16 // Horizontal mirroring. 17 // Horizontal mirroring.
17 EXPECT_EQ(BubbleBorder::TOP_RIGHT, 18 EXPECT_EQ(BubbleBorder::TOP_RIGHT,
18 BubbleBorder::horizontal_mirror(BubbleBorder::TOP_LEFT)); 19 BubbleBorder::horizontal_mirror(BubbleBorder::TOP_LEFT));
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 border.set_arrow(cases[i].arrow); 407 border.set_arrow(cases[i].arrow);
407 border.set_alignment(cases[i].alignment); 408 border.set_alignment(cases[i].alignment);
408 409
409 gfx::Point origin = border.GetBounds(kAnchor, kContentSize).origin(); 410 gfx::Point origin = border.GetBounds(kAnchor, kContentSize).origin();
410 EXPECT_EQ(cases[i].expected_x, origin.x()); 411 EXPECT_EQ(cases[i].expected_x, origin.x());
411 EXPECT_EQ(cases[i].expected_y, origin.y()); 412 EXPECT_EQ(cases[i].expected_y, origin.y());
412 } 413 }
413 } 414 }
414 415
415 } // namespace views 416 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698