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 "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" | 8 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 MOCK_METHOD1(SetSelectionAtPoint, void(const gfx::Point&)); | 31 MOCK_METHOD1(SetSelectionAtPoint, void(const gfx::Point&)); |
32 MOCK_METHOD0(AcceptSelectedLine, bool()); | 32 MOCK_METHOD0(AcceptSelectedLine, bool()); |
33 MOCK_METHOD0(SelectionCleared, void()); | 33 MOCK_METHOD0(SelectionCleared, void()); |
34 // TODO(jdduke): Mock this method upon resolution of crbug.com/352463. | 34 // TODO(jdduke): Mock this method upon resolution of crbug.com/352463. |
35 MOCK_CONST_METHOD0(popup_bounds, gfx::Rect()); | 35 MOCK_CONST_METHOD0(popup_bounds, gfx::Rect()); |
36 MOCK_METHOD0(container_view, gfx::NativeView()); | 36 MOCK_METHOD0(container_view, gfx::NativeView()); |
37 MOCK_CONST_METHOD0(element_bounds, gfx::RectF&()); | 37 MOCK_CONST_METHOD0(element_bounds, gfx::RectF&()); |
38 MOCK_CONST_METHOD0(IsRTL, bool()); | 38 MOCK_CONST_METHOD0(IsRTL, bool()); |
39 MOCK_METHOD0(GetSuggestions, const std::vector<autofill::Suggestion>()); | 39 MOCK_METHOD0(GetSuggestions, const std::vector<autofill::Suggestion>()); |
40 #if !defined(OS_ANDROID) | 40 #if !defined(OS_ANDROID) |
41 MOCK_METHOD1(GetElidedValueWidthForRow, int(size_t)); | 41 MOCK_METHOD1(GetElidedValueWidthForRow, int(int)); |
42 MOCK_METHOD1(GetElidedLabelWidthForRow, int(size_t)); | 42 MOCK_METHOD1(GetElidedLabelWidthForRow, int(int)); |
43 #endif | 43 #endif |
44 }; | 44 }; |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 class AutofillPopupBaseViewTest : public InProcessBrowserTest { | 48 class AutofillPopupBaseViewTest : public InProcessBrowserTest { |
49 public: | 49 public: |
50 AutofillPopupBaseViewTest() {} | 50 AutofillPopupBaseViewTest() {} |
51 ~AutofillPopupBaseViewTest() override {} | 51 ~AutofillPopupBaseViewTest() override {} |
52 | 52 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 ShowView(); | 144 ShowView(); |
145 | 145 |
146 gfx::Point display_point = | 146 gfx::Point display_point = |
147 static_cast<views::View*>(view_)->GetBoundsInScreen().origin(); | 147 static_cast<views::View*>(view_)->GetBoundsInScreen().origin(); |
148 gfx::Point expected_point = bounds.origin(); | 148 gfx::Point expected_point = bounds.origin(); |
149 EXPECT_EQ(expected_point, display_point); | 149 EXPECT_EQ(expected_point, display_point); |
150 } | 150 } |
151 | 151 |
152 } // namespace autofill | 152 } // namespace autofill |
OLD | NEW |