ladybird/Tests/LibWeb/Text/input/Fetch/fetch-response-url-encoded.html
Timothy Flynn c9cbaeb59d LibWeb: Convert some sync tests to be async
The events tested here are decidedly async. We also can't really write
sync tests of the form "test(async () => {})". Nothing will await the
async callback.
2024-10-03 07:07:28 -04:00

18 lines
567 B
HTML

<script src="../include.js"></script>
<script>
asyncTest(done => {
const data = "param-a=value-a&param-b=value-b&param-c=value-c1&param-c=value-c2";
const response = new Response(data, {
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
});
response.formData().then((formData) => {
println(formData.get("param-a"));
println(formData.get("param-b"));
println(formData.getAll("param-c"));
done();
});
});
</script>