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

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: new workstation Created 8 years 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 SelectAutofillSuggestion(int unique_id) OVERRIDE {} 38 virtual void DidSelectSuggestion(int unique_id) OVERRIDE {}
39 39
40 virtual void ClearPreviewedForm() OVERRIDE {} 40 virtual void ClearPreviewedForm() OVERRIDE {}
41 41
42 AutofillPopupControllerImpl* GetController() { 42 AutofillPopupControllerImpl* GetController() {
43 return controller(); 43 return controller();
44 } 44 }
45 45
46 MOCK_METHOD0(HideAutofillPopup, void()); 46 MOCK_METHOD0(HideAutofillPopup, void());
47 }; 47 };
48 48
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 MAYBE_CloseWidgetAndNoLeaking) { 140 MAYBE_CloseWidgetAndNoLeaking) {
141 EXPECT_CALL(*autofill_external_delegate_, 141 EXPECT_CALL(*autofill_external_delegate_,
142 HideAutofillPopup()).Times(AtLeast(1)); 142 HideAutofillPopup()).Times(AtLeast(1));
143 143
144 autofill::GenerateTestAutofillPopup(autofill_external_delegate_.get()); 144 autofill::GenerateTestAutofillPopup(autofill_external_delegate_.get());
145 145
146 // Delete the view from under the delegate to ensure that the 146 // Delete the view from under the delegate to ensure that the
147 // delegate and the controller can handle the popup getting deleted elsewhere. 147 // delegate and the controller can handle the popup getting deleted elsewhere.
148 autofill_external_delegate_->GetController()->view()->Hide(); 148 autofill_external_delegate_->GetController()->view()->Hide();
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_external_delegate.cc ('k') | chrome/browser/autofill/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698