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

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

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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
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/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 AutofillManager* autofill_manager = autofill_driver->autofill_manager(); 152 AutofillManager* autofill_manager = autofill_driver->autofill_manager();
153 autofill_manager->SetTestDelegate(&test_delegate_); 153 autofill_manager->SetTestDelegate(&test_delegate_);
154 154
155 // If the mouse happened to be over where the suggestions are shown, then 155 // If the mouse happened to be over where the suggestions are shown, then
156 // the preview will show up and will fail the tests. We need to give it a 156 // the preview will show up and will fail the tests. We need to give it a
157 // point that's within the browser frame, or else the method hangs. 157 // point that's within the browser frame, or else the method hangs.
158 gfx::Point reset_mouse(GetWebContents()->GetContainerBounds().origin()); 158 gfx::Point reset_mouse(GetWebContents()->GetContainerBounds().origin());
159 reset_mouse = gfx::Point(reset_mouse.x() + 5, reset_mouse.y() + 5); 159 reset_mouse = gfx::Point(reset_mouse.x() + 5, reset_mouse.y() + 5);
160 ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(reset_mouse)); 160 ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(reset_mouse));
161 161
162 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 162 ASSERT_TRUE(embedded_test_server()->Start());
163 InProcessBrowserTest::SetUpOnMainThread(); 163 InProcessBrowserTest::SetUpOnMainThread();
164 } 164 }
165 165
166 void TearDownOnMainThread() override { 166 void TearDownOnMainThread() override {
167 // Make sure to close any showing popups prior to tearing down the UI. 167 // Make sure to close any showing popups prior to tearing down the UI.
168 content::WebContents* web_contents = GetWebContents(); 168 content::WebContents* web_contents = GetWebContents();
169 AutofillManager* autofill_manager = 169 AutofillManager* autofill_manager =
170 ContentAutofillDriverFactory::FromWebContents(web_contents) 170 ContentAutofillDriverFactory::FromWebContents(web_contents)
171 ->DriverForFrame(web_contents->GetMainFrame()) 171 ->DriverForFrame(web_contents->GetMainFrame())
172 ->autofill_manager(); 172 ->autofill_manager();
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 ASSERT_TRUE(content::ExecuteScript( 1390 ASSERT_TRUE(content::ExecuteScript(
1391 GetRenderViewHost(), 1391 GetRenderViewHost(),
1392 "document.querySelector('input').autocomplete = 'off';")); 1392 "document.querySelector('input').autocomplete = 'off';"));
1393 1393
1394 // Press the down arrow to select the suggestion and attempt to preview the 1394 // Press the down arrow to select the suggestion and attempt to preview the
1395 // autofilled form. 1395 // autofilled form.
1396 SendKeyToPopupAndWait(ui::VKEY_DOWN); 1396 SendKeyToPopupAndWait(ui::VKEY_DOWN);
1397 } 1397 }
1398 1398
1399 } // namespace autofill 1399 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/banners/app_banner_data_fetcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698