| Index: LayoutTests/http/tests/misc/client-hints-accept.php
|
| diff --git a/LayoutTests/http/tests/misc/client-hints-accept.php b/LayoutTests/http/tests/misc/client-hints-accept.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2687428004d5756bcb22f984df10a86d33605d16
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/misc/client-hints-accept.php
|
| @@ -0,0 +1,30 @@
|
| +<?php
|
| + header("ACCEPT-CH: DPR, RW");
|
| +?>
|
| +<!DOCTYPE html>
|
| +<script src="/w3c/resources/testharness.js"></script>
|
| +<script src="/w3c/resources/testharnessreport.js"></script>
|
| +<body>
|
| + <script>
|
| + var t = async_test('Client-Hints sent when Aceept-CH header is present');
|
| + var body = document.body;
|
| + var unreached = function() {
|
| + assert_unreached("Image should have loaded.");
|
| + };
|
| +
|
| + var loadRWImage = function() {
|
| + var img = new Image();
|
| + img.src = 'resources/image-checks-for-rw.php';
|
| + img.onload = t.step_func(function(){ t.done(); });
|
| + img.onerror = t.step_func(unreached);
|
| + body.appendChild(img);
|
| + };
|
| + t.step(function() {
|
| + var img = new Image();
|
| + img.src = 'resources/image-checks-for-dpr.php';
|
| + img.onload = t.step_func(loadRWImage);
|
| + img.onerror = t.step_func(unreached);
|
| + body.appendChild(img);
|
| + });
|
| + </script>
|
| +</body>
|
|
|