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

Unified Diff: chrome/renderer/autofill/form_autocomplete_browsertest.cc

Issue 2797443004: Prevent autocomplete tests from being broken by data URL deprecation. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_server_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/form_autocomplete_browsertest.cc
diff --git a/chrome/renderer/autofill/form_autocomplete_browsertest.cc b/chrome/renderer/autofill/form_autocomplete_browsertest.cc
index 1bbf458d652fd8eeea3276e369ee3eff16783f36..9af4b4cd041d20143bc272e9b27cd9b09fad3471 100644
--- a/chrome/renderer/autofill/form_autocomplete_browsertest.cc
+++ b/chrome/renderer/autofill/form_autocomplete_browsertest.cc
@@ -206,8 +206,10 @@ class FormAutocompleteTest : public ChromeRenderViewTest {
// messages with the form fields.
TEST_F(FormAutocompleteTest, NormalFormSubmit) {
// Load a form.
- LoadHTML("<html><form id='myForm'><input name='fname' value='Rick'/>"
- "<input name='lname' value='Deckard'/></form></html>");
+ LoadHTML(
+ "<html><form id='myForm' action='about:blank'>"
+ "<input name='fname' value='Rick'/>"
+ "<input name='lname' value='Deckard'/></form></html>");
// Submit the form.
ExecuteJavaScriptForTests("document.getElementById('myForm').submit();");
@@ -593,10 +595,11 @@ TEST_F(FormAutocompleteTest, InteractingInDifferentForms_FocusNoLongerOnForm) {
// WillSubmitForm and FormSubmitted messages.
TEST_F(FormAutocompleteTest, AutoCompleteOffFormSubmit) {
// Load a form.
- LoadHTML("<html><form id='myForm' autocomplete='off'>"
- "<input name='fname' value='Rick'/>"
- "<input name='lname' value='Deckard'/>"
- "</form></html>");
+ LoadHTML(
+ "<html><form id='myForm' autocomplete='off' action='about:blank'>"
+ "<input name='fname' value='Rick'/>"
+ "<input name='lname' value='Deckard'/>"
+ "</form></html>");
// Submit the form.
ExecuteJavaScriptForTests("document.getElementById('myForm').submit();");
@@ -609,10 +612,11 @@ TEST_F(FormAutocompleteTest, AutoCompleteOffFormSubmit) {
// Tests that fields with autocomplete off are submitted.
TEST_F(FormAutocompleteTest, AutoCompleteOffInputSubmit) {
// Load a form.
- LoadHTML("<html><form id='myForm'>"
- "<input name='fname' value='Rick'/>"
- "<input name='lname' value='Deckard' autocomplete='off'/>"
- "</form></html>");
+ LoadHTML(
+ "<html><form id='myForm' action='about:blank'>"
+ "<input name='fname' value='Rick'/>"
+ "<input name='lname' value='Deckard' autocomplete='off'/>"
+ "</form></html>");
// Submit the form.
ExecuteJavaScriptForTests("document.getElementById('myForm').submit();");
@@ -626,8 +630,10 @@ TEST_F(FormAutocompleteTest, AutoCompleteOffInputSubmit) {
// off generates WillSubmitForm and FormSubmitted messages.
// Note: We previously did the opposite, for bug http://crbug.com/36520
TEST_F(FormAutocompleteTest, DynamicAutoCompleteOffFormSubmit) {
- LoadHTML("<html><form id='myForm'><input name='fname' value='Rick'/>"
- "<input name='lname' value='Deckard'/></form></html>");
+ LoadHTML(
+ "<html><form id='myForm' action='about:blank'>"
+ "<input name='fname' value='Rick'/>"
+ "<input name='lname' value='Deckard'/></form></html>");
WebElement element =
GetMainFrame()->document().getElementById(blink::WebString("myForm"));
« no previous file with comments | « chrome/browser/autofill/autofill_server_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698