OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 ContentAutofillDriver::FromWebContents(web_contents); | 213 ContentAutofillDriver::FromWebContents(web_contents); |
214 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); | 214 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); |
215 autofill_manager->SetTestDelegate(&test_delegate_); | 215 autofill_manager->SetTestDelegate(&test_delegate_); |
216 } | 216 } |
217 | 217 |
218 virtual void CleanUpOnMainThread() OVERRIDE { | 218 virtual void CleanUpOnMainThread() OVERRIDE { |
219 // Make sure to close any showing popups prior to tearing down the UI. | 219 // Make sure to close any showing popups prior to tearing down the UI. |
220 content::WebContents* web_contents = GetWebContents(); | 220 content::WebContents* web_contents = GetWebContents(); |
221 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( | 221 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( |
222 web_contents)->autofill_manager(); | 222 web_contents)->autofill_manager(); |
223 autofill_manager->delegate()->HideAutofillPopup(); | 223 autofill_manager->client()->HideAutofillPopup(); |
224 } | 224 } |
225 | 225 |
226 PersonalDataManager* GetPersonalDataManager() { | 226 PersonalDataManager* GetPersonalDataManager() { |
227 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 227 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
228 } | 228 } |
229 | 229 |
230 content::WebContents* GetWebContents() { | 230 content::WebContents* GetWebContents() { |
231 return browser()->tab_strip_model()->GetActiveWebContents(); | 231 return browser()->tab_strip_model()->GetActiveWebContents(); |
232 } | 232 } |
233 | 233 |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 ASSERT_TRUE(content::ExecuteScript( | 1229 ASSERT_TRUE(content::ExecuteScript( |
1230 GetRenderViewHost(), | 1230 GetRenderViewHost(), |
1231 "document.querySelector('input').autocomplete = 'off';")); | 1231 "document.querySelector('input').autocomplete = 'off';")); |
1232 | 1232 |
1233 // Press the down arrow to select the suggestion and attempt to preview the | 1233 // Press the down arrow to select the suggestion and attempt to preview the |
1234 // autofilled form. | 1234 // autofilled form. |
1235 SendKeyToPopupAndWait(ui::VKEY_DOWN); | 1235 SendKeyToPopupAndWait(ui::VKEY_DOWN); |
1236 } | 1236 } |
1237 | 1237 |
1238 } // namespace autofill | 1238 } // namespace autofill |
OLD | NEW |