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