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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc

Issue 12188020: Adding the page and DPI scale adjustment for Autofill Popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mock call fix #2 Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
index 3a43b3e0e684d512bccf366a9165e0d02c32418f..646a39dbc42627c5f8d2ace03458a391ee0f5f18 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
@@ -36,7 +36,7 @@ class TestAutofillPopupController : public AutofillPopupControllerImpl {
public:
explicit TestAutofillPopupController(
AutofillExternalDelegate* external_delegate,
- const gfx::Rect& element_bounds)
+ const gfx::RectF& element_bounds)
: AutofillPopupControllerImpl(external_delegate, NULL, element_bounds) {}
virtual ~TestAutofillPopupController() {}
@@ -76,7 +76,7 @@ class TestAutofillPopupController : public AutofillPopupControllerImpl {
const gfx::Rect& popup_bounds() const {
return AutofillPopupControllerImpl::popup_bounds();
}
- const gfx::Rect& element_bounds() const {
+ const gfx::RectF& element_bounds() const {
return AutofillPopupControllerImpl::element_bounds();
}
#if !defined(OS_ANDROID)
@@ -280,7 +280,7 @@ TEST_F(AutofillPopupControllerUnitTest, GetOrCreate) {
gfx::Rect());
EXPECT_CALL(*test_controller, Hide());
- gfx::Rect bounds(0, 0, 1, 2);
+ gfx::RectF bounds(0, 0, 1, 2);
Ted C 2013/02/06 00:35:24 0.f, etc...
aurimas (slooooooooow) 2013/02/06 00:50:46 Done.
AutofillPopupControllerImpl* controller3 =
AutofillPopupControllerImpl::GetOrCreate(
test_controller,
@@ -344,40 +344,40 @@ TEST_F(AutofillPopupControllerUnitTest, GrowPopupInSpace) {
// Store the possible element bounds and the popup bounds they should result
// in.
- std::vector<gfx::Rect> element_bounds;
+ std::vector<gfx::RectF> element_bounds;
std::vector<gfx::Rect> expected_popup_bounds;
// The popup grows down and to the right.
- element_bounds.push_back(gfx::Rect(0, 0, 0, 0));
+ element_bounds.push_back(gfx::RectF(0, 0, 0, 0));
expected_popup_bounds.push_back(
gfx::Rect(0, 0, desired_width, desired_height));
// The popup grows down and to the left.
- element_bounds.push_back(gfx::Rect(2 * desired_width, 0, 0, 0));
+ element_bounds.push_back(gfx::RectF(2 * desired_width, 0, 0, 0));
expected_popup_bounds.push_back(
gfx::Rect(desired_width, 0, desired_width, desired_height));
// The popup grows up and to the right.
- element_bounds.push_back(gfx::Rect(0, 2 * desired_height, 0, 0));
+ element_bounds.push_back(gfx::RectF(0, 2 * desired_height, 0, 0));
expected_popup_bounds.push_back(
gfx::Rect(0, desired_height, desired_width, desired_height));
// The popup grows up and to the left.
element_bounds.push_back(
- gfx::Rect(2 * desired_width, 2 * desired_height, 0, 0));
+ gfx::RectF(2 * desired_width, 2 * desired_height, 0, 0));
expected_popup_bounds.push_back(
gfx::Rect(desired_width, desired_height, desired_width, desired_height));
// The popup would be partial off the top and left side of the screen.
element_bounds.push_back(
- gfx::Rect(-desired_width / 2, -desired_height / 2, 0, 0));
+ gfx::RectF(-desired_width / 2, -desired_height / 2, 0, 0));
expected_popup_bounds.push_back(
gfx::Rect(0, 0, desired_width, desired_height));
// The popup would be partially off the bottom and the right side of
// the screen.
element_bounds.push_back(
- gfx::Rect(desired_width * 1.5, desired_height * 1.5, 0, 0));
+ gfx::RectF(desired_width * 1.5, desired_height * 1.5, 0, 0));
expected_popup_bounds.push_back(gfx::Rect(
desired_width / 2, desired_height /2, desired_width, desired_height));

Powered by Google App Engine
This is Rietveld 408576698