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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 test::DisableSystemServices(browser()->profile()->GetPrefs()); | 206 test::DisableSystemServices(browser()->profile()->GetPrefs()); |
207 | 207 |
208 // Inject the test delegate into the AutofillManager. | 208 // Inject the test delegate into the AutofillManager. |
209 content::WebContents* web_contents = GetWebContents(); | 209 content::WebContents* web_contents = GetWebContents(); |
210 ContentAutofillDriver* autofill_driver = | 210 ContentAutofillDriver* autofill_driver = |
211 ContentAutofillDriver::FromWebContents(web_contents); | 211 ContentAutofillDriver::FromWebContents(web_contents); |
212 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); | 212 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); |
213 autofill_manager->SetTestDelegate(&test_delegate_); | 213 autofill_manager->SetTestDelegate(&test_delegate_); |
214 } | 214 } |
215 | 215 |
216 virtual void CleanUpOnMainThread() OVERRIDE { | 216 virtual void TearDownOnMainThread() OVERRIDE { |
217 // Make sure to close any showing popups prior to tearing down the UI. | 217 // Make sure to close any showing popups prior to tearing down the UI. |
218 content::WebContents* web_contents = GetWebContents(); | 218 content::WebContents* web_contents = GetWebContents(); |
219 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( | 219 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( |
220 web_contents)->autofill_manager(); | 220 web_contents)->autofill_manager(); |
221 autofill_manager->client()->HideAutofillPopup(); | 221 autofill_manager->client()->HideAutofillPopup(); |
222 } | 222 } |
223 | 223 |
224 PersonalDataManager* GetPersonalDataManager() { | 224 PersonalDataManager* GetPersonalDataManager() { |
225 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 225 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
226 } | 226 } |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 ASSERT_TRUE(content::ExecuteScript( | 1266 ASSERT_TRUE(content::ExecuteScript( |
1267 GetRenderViewHost(), | 1267 GetRenderViewHost(), |
1268 "document.querySelector('input').autocomplete = 'off';")); | 1268 "document.querySelector('input').autocomplete = 'off';")); |
1269 | 1269 |
1270 // Press the down arrow to select the suggestion and attempt to preview the | 1270 // Press the down arrow to select the suggestion and attempt to preview the |
1271 // autofilled form. | 1271 // autofilled form. |
1272 SendKeyToPopupAndWait(ui::VKEY_DOWN); | 1272 SendKeyToPopupAndWait(ui::VKEY_DOWN); |
1273 } | 1273 } |
1274 | 1274 |
1275 } // namespace autofill | 1275 } // namespace autofill |
OLD | NEW |