http: add PROPOFIND method test case

This commit is contained in:
Pierre Tachoire
2026-02-09 15:15:50 +01:00
parent 2e5d04389b
commit 115530a104
2 changed files with 21 additions and 0 deletions

View File

@@ -106,3 +106,17 @@
testing.expectEqual(req5, target);
})
</script>
<script id=xhr6 type=module>
const req5 = new XMLHttpRequest()
const promise5 = new Promise((resolve) => {
req5.onload = resolve;
req5.open('PROPFIND', 'http://127.0.0.1:9589/xhr')
req5.send('foo')
});
testing.async(promise5, () => {
testing.expectEqual(200, req5.status);
testing.expectEqual('OK', req5.statusText);
testing.expectEqual(true, req5.responseText.length > 65);
});

View File

@@ -130,3 +130,10 @@
testing.expectEqual("you", request2.headers.get("target"));
}
</script>
<script id=propfind>
{
const req = new Request('https://example.com/api', { method: 'propfind' });
testing.expectEqual('PROPFIND', req.method);
}
</script>