Skip to content

Commit

Permalink
Form-associated custom elements: Fix the initial value of 'submission…
Browse files Browse the repository at this point in the history
… value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}
  • Loading branch information
tkent-google authored and chromium-wpt-export-bot committed Feb 14, 2020
1 parent c8671a2 commit 3ee8fd8
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -77,7 +77,7 @@
$('[name=name-usv]').value = USV_INPUT;
$('[name=name-file]').value = new File(['file content'], FILE_NAME);
return submitPromise(t).then(query => {
assert_equals(query, `?name-pd1=value-pd1&name-ce1=&name-usv=${encodeURIComponent(USV_OUTPUT)}&name-file=${FILE_NAME}`);
assert_equals(query, `?name-pd1=value-pd1&name-usv=${encodeURIComponent(USV_OUTPUT)}&name-file=${FILE_NAME}`);
});
}, 'Single value - Non-empty name exists');

Expand All @@ -90,7 +90,7 @@
'<iframe name="if1"></iframe>';
$('my-control').value = null;
return submitPromise(t).then(query => {
assert_equals(query, '?name-pd1=value-pd1&name-ce2=');
assert_equals(query, '?name-pd1=value-pd1');
});
}, 'Null value should submit nothing');

Expand Down

0 comments on commit 3ee8fd8

Please sign in to comment.