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

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

Issue 180953004: Componentize several Autofill unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 9 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) 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 key_press_event_sink_( 202 key_press_event_sink_(
203 base::Bind(&AutofillInteractiveTest::HandleKeyPressEvent, 203 base::Bind(&AutofillInteractiveTest::HandleKeyPressEvent,
204 base::Unretained(this))) {} 204 base::Unretained(this))) {}
205 virtual ~AutofillInteractiveTest() {} 205 virtual ~AutofillInteractiveTest() {}
206 206
207 // InProcessBrowserTest: 207 // InProcessBrowserTest:
208 virtual void SetUpOnMainThread() OVERRIDE { 208 virtual void SetUpOnMainThread() OVERRIDE {
209 TranslateService::SetUseInfobar(true); 209 TranslateService::SetUseInfobar(true);
210 210
211 // Don't want Keychain coming up on Mac. 211 // Don't want Keychain coming up on Mac.
212 test::DisableSystemServices(browser()->profile()); 212 test::DisableSystemServices(browser()->profile()->GetPrefs());
213 213
214 // Inject the test delegate into the AutofillManager. 214 // Inject the test delegate into the AutofillManager.
215 content::WebContents* web_contents = GetWebContents(); 215 content::WebContents* web_contents = GetWebContents();
216 AutofillDriverImpl* autofill_driver = 216 AutofillDriverImpl* autofill_driver =
217 AutofillDriverImpl::FromWebContents(web_contents); 217 AutofillDriverImpl::FromWebContents(web_contents);
218 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); 218 AutofillManager* autofill_manager = autofill_driver->autofill_manager();
219 autofill_manager->SetTestDelegate(&test_delegate_); 219 autofill_manager->SetTestDelegate(&test_delegate_);
220 } 220 }
221 221
222 virtual void CleanUpOnMainThread() OVERRIDE { 222 virtual void CleanUpOnMainThread() OVERRIDE {
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 ASSERT_TRUE(content::ExecuteScript( 1090 ASSERT_TRUE(content::ExecuteScript(
1091 GetRenderViewHost(), 1091 GetRenderViewHost(),
1092 "document.querySelector('input').autocomplete = 'off';")); 1092 "document.querySelector('input').autocomplete = 'off';"));
1093 1093
1094 // Press the down arrow to select the suggestion and attempt to preview the 1094 // Press the down arrow to select the suggestion and attempt to preview the
1095 // autofilled form. 1095 // autofilled form.
1096 SendKeyToPopupAndWait(ui::VKEY_DOWN); 1096 SendKeyToPopupAndWait(ui::VKEY_DOWN);
1097 } 1097 }
1098 1098
1099 } // namespace autofill 1099 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698