OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/views/info_bubble.h" | 5 #include "chrome/browser/ui/views/info_bubble.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 typedef testing::Test InfoBubbleTest; | 8 typedef testing::Test InfoBubbleTest; |
9 | 9 |
10 class TestBorderContents : public BorderContents { | 10 class TestBorderContents : public BorderContents { |
11 public: | 11 public: |
12 TestBorderContents() {} | 12 TestBorderContents() {} |
13 | 13 |
14 void set_monitor_bounds(const gfx::Rect& bounds) { | 14 void set_monitor_bounds(const gfx::Rect& bounds) { |
15 monitor_bounds_ = bounds; | 15 monitor_bounds_ = bounds; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 border_contents.bubble_border()->arrow_location(); | 228 border_contents.bubble_border()->arrow_location(); |
229 EXPECT_TRUE(BubbleBorder::has_arrow(arrow_location)); | 229 EXPECT_TRUE(BubbleBorder::has_arrow(arrow_location)); |
230 EXPECT_TRUE(BubbleBorder::is_arrow_on_top(arrow_location)); | 230 EXPECT_TRUE(BubbleBorder::is_arrow_on_top(arrow_location)); |
231 EXPECT_FALSE(BubbleBorder::is_arrow_on_left(arrow_location)); | 231 EXPECT_FALSE(BubbleBorder::is_arrow_on_left(arrow_location)); |
232 // The coordinates should be pointing to 'positive relative to' from | 232 // The coordinates should be pointing to 'positive relative to' from |
233 // TOP_RIGHT. | 233 // TOP_RIGHT. |
234 EXPECT_LT(window_bounds.x(), 100 + 50 - 500); | 234 EXPECT_LT(window_bounds.x(), 100 + 50 - 500); |
235 EXPECT_GT(window_bounds.y(), 900 + 50 - 10); // -10 to roughly compensate for | 235 EXPECT_GT(window_bounds.y(), 900 + 50 - 10); // -10 to roughly compensate for |
236 // arrow overlap. | 236 // arrow overlap. |
237 } | 237 } |
OLD | NEW |