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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate_browsertest.cc

Issue 11636040: AutofillPopupController clarifications + simplifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ilya review Created 7 years, 12 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 (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 "chrome/browser/autofill/autofill_manager.h" 6 #include "chrome/browser/autofill/autofill_manager.h"
7 #include "chrome/browser/autofill/test_autofill_external_delegate.h" 7 #include "chrome/browser/autofill/test_autofill_external_delegate.h"
8 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 8 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
9 #include "chrome/browser/ui/autofill/autofill_popup_view.h" 9 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 17 matching lines...) Expand all
28 namespace { 28 namespace {
29 29
30 class MockAutofillExternalDelegate : public AutofillExternalDelegate { 30 class MockAutofillExternalDelegate : public AutofillExternalDelegate {
31 public: 31 public:
32 explicit MockAutofillExternalDelegate(content::WebContents* web_contents) 32 explicit MockAutofillExternalDelegate(content::WebContents* web_contents)
33 : AutofillExternalDelegate( 33 : AutofillExternalDelegate(
34 web_contents, 34 web_contents,
35 AutofillManager::FromWebContents(web_contents)) {} 35 AutofillManager::FromWebContents(web_contents)) {}
36 ~MockAutofillExternalDelegate() {} 36 ~MockAutofillExternalDelegate() {}
37 37
38 virtual void SelectAutofillSuggestionAtIndex(int unique_id) 38 virtual void SelectSuggestion(int unique_id) OVERRIDE {}
39 OVERRIDE {}
40 39
41 virtual void ClearPreviewedForm() OVERRIDE {} 40 virtual void ClearPreviewedForm() OVERRIDE {}
42 41
43 AutofillPopupControllerImpl* GetController() { 42 AutofillPopupControllerImpl* GetController() {
44 return controller(); 43 return controller();
45 } 44 }
46 45
47 MOCK_METHOD0(HideAutofillPopup, void()); 46 MOCK_METHOD0(HideAutofillPopup, void());
48 }; 47 };
49 48
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 MAYBE_CloseWidgetAndNoLeaking) { 140 MAYBE_CloseWidgetAndNoLeaking) {
142 EXPECT_CALL(*autofill_external_delegate_, 141 EXPECT_CALL(*autofill_external_delegate_,
143 HideAutofillPopup()).Times(AtLeast(1)); 142 HideAutofillPopup()).Times(AtLeast(1));
144 143
145 autofill::GenerateTestAutofillPopup(autofill_external_delegate_.get()); 144 autofill::GenerateTestAutofillPopup(autofill_external_delegate_.get());
146 145
147 // Delete the view from under the delegate to ensure that the 146 // Delete the view from under the delegate to ensure that the
148 // delegate and the controller can handle the popup getting deleted elsewhere. 147 // delegate and the controller can handle the popup getting deleted elsewhere.
149 autofill_external_delegate_->GetController()->view()->Hide(); 148 autofill_external_delegate_->GetController()->view()->Hide();
150 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698