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

Side by Side Diff: chrome/browser/ui/autofill/popup_controller_common_unittest.cc

Issue 342833002: [Password Generation] Update Aura UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Coments Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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/autofill/popup_controller_common.h" 5 #include "chrome/browser/ui/autofill/popup_controller_common.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/ui/autofill/test_popup_controller_common.h" 8 #include "chrome/browser/ui/autofill/test_popup_controller_common.h"
9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 9 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 gfx::RectF(desired_width * 1.5, desired_height * 1.5, 0, 0)); 67 gfx::RectF(desired_width * 1.5, desired_height * 1.5, 0, 0));
68 expected_popup_bounds.push_back( 68 expected_popup_bounds.push_back(
69 gfx::Rect((desired_width + 1) / 2, (desired_height + 1) / 2, 69 gfx::Rect((desired_width + 1) / 2, (desired_height + 1) / 2,
70 desired_width, desired_height)); 70 desired_width, desired_height));
71 71
72 for (size_t i = 0; i < element_bounds.size(); ++i) { 72 for (size_t i = 0; i < element_bounds.size(); ++i) {
73 scoped_ptr<TestPopupControllerCommon> popup_controller( 73 scoped_ptr<TestPopupControllerCommon> popup_controller(
74 new TestPopupControllerCommon(element_bounds[i])); 74 new TestPopupControllerCommon(element_bounds[i]));
75 popup_controller->set_display(display); 75 popup_controller->set_display(display);
76 gfx::Rect actual_popup_bounds = 76 gfx::Rect actual_popup_bounds =
77 popup_controller->GetPopupBounds(desired_height, desired_width); 77 popup_controller->GetPopupBounds(desired_width, desired_height);
78 78
79 EXPECT_EQ(expected_popup_bounds[i].ToString(), 79 EXPECT_EQ(expected_popup_bounds[i].ToString(),
80 actual_popup_bounds.ToString()) << 80 actual_popup_bounds.ToString()) <<
81 "Popup bounds failed to match for test " << i; 81 "Popup bounds failed to match for test " << i;
82 } 82 }
83 } 83 }
84 84
85 } // namespace autofill 85 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698