mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 68a256f49be380ca4add535ce8ece9de28820e6b
This commit is contained in:
parent
e54935c25a
commit
cd5bf022bd
178 changed files with 6082 additions and 795 deletions
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Check form-data for image submit button with non-empty 'value' attribute</title>
|
||||
<link rel="author" title="Shanmuga Pandi" href="mailto:shanmuga.m@samsung.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-form-data-set">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
// promise_test instead of async_test because this test use window.success, and so can't run at the same time.
|
||||
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
window.success = t.step_func(locationLoaded => {
|
||||
const expected = (new URL("resources/image-submit-click.html?name.x=0&name.y=0", location.href)).href;
|
||||
assert_equals(locationLoaded, expected);
|
||||
resolve();
|
||||
});
|
||||
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.src = "resources/image-submit-click.html";
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
}, "Image submit button should not add extra form data if 'value' attribute is present with non-empty value");
|
||||
</script>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<form>
|
||||
<input type="image" name="name" value="value">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
if (window.location.search.startsWith("?name.x")) {
|
||||
// The action pointed to ourself, so the form submitted something
|
||||
window.parent.success(window.location.href);
|
||||
} else {
|
||||
const input = document.querySelector("input");
|
||||
input.click();
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue