1
0
Fork 0
firefox/testing/web-platform/tests/client-hints/resources/accept-ch.wildcard.iframe.https.sub.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
591 B
HTML

<!doctype html>
<meta charset="utf-8">
<script>
// Step 2 (client-hints/accept-ch.wildcard.https.sub.html)
const xhr = new XMLHttpRequest();
xhr.open('POST', "https://{{domains[www2]}}:{{ports[https][0]}}/client-hints/resources/echo-ua-client-hints-received.py");
xhr.onload = function() {
// Step 3 (client-hints/accept-ch.wildcard.https.sub.html)
if (xhr.getResponseHeader("sec-ch-ua-platform-received") != null) {
window.top.postMessage("HadPlatformVersion", "*");
} else {
window.top.postMessage("MissingPlatformVersion", "*");
}
};
xhr.send();
</script>