OLD | NEW |
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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
7 #include "base/prefs/testing_pref_service.h" | 7 #include "base/prefs/testing_pref_service.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" | 9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 {} | 39 {} |
40 virtual void ClearPreviewedForm() OVERRIDE {} | 40 virtual void ClearPreviewedForm() OVERRIDE {} |
41 }; | 41 }; |
42 | 42 |
43 class MockAutofillManagerDelegate | 43 class MockAutofillManagerDelegate |
44 : public autofill::TestAutofillManagerDelegate { | 44 : public autofill::TestAutofillManagerDelegate { |
45 public: | 45 public: |
46 MockAutofillManagerDelegate() {} | 46 MockAutofillManagerDelegate() {} |
47 virtual ~MockAutofillManagerDelegate() {} | 47 virtual ~MockAutofillManagerDelegate() {} |
48 | 48 |
49 virtual PrefService* GetPrefs() { return &prefs_; } | 49 virtual PrefService* GetPrefs() OVERRIDE { return &prefs_; } |
50 | 50 |
51 private: | 51 private: |
52 TestingPrefServiceSimple prefs_; | 52 TestingPrefServiceSimple prefs_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(MockAutofillManagerDelegate); | 54 DISALLOW_COPY_AND_ASSIGN(MockAutofillManagerDelegate); |
55 }; | 55 }; |
56 | 56 |
57 class TestAutofillPopupController : public AutofillPopupControllerImpl { | 57 class TestAutofillPopupController : public AutofillPopupControllerImpl { |
58 public: | 58 public: |
59 explicit TestAutofillPopupController( | 59 explicit TestAutofillPopupController( |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 autofill_popup_controller->Show(names, names, names, autofill_ids); | 427 autofill_popup_controller->Show(names, names, names, autofill_ids); |
428 | 428 |
429 EXPECT_EQ(expected_popup_bounds[i].ToString(), | 429 EXPECT_EQ(expected_popup_bounds[i].ToString(), |
430 autofill_popup_controller->popup_bounds().ToString()) << | 430 autofill_popup_controller->popup_bounds().ToString()) << |
431 "Popup bounds failed to match for test " << i; | 431 "Popup bounds failed to match for test " << i; |
432 | 432 |
433 // Hide the controller to delete it. | 433 // Hide the controller to delete it. |
434 autofill_popup_controller->DoHide(); | 434 autofill_popup_controller->DoHide(); |
435 } | 435 } |
436 } | 436 } |
OLD | NEW |