Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: LayoutTests/http/tests/misc/client-hints-accept.php

Issue 951303003: Added basic client hints support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?php
2 header("ACCEPT-CH: DPR, RW");
3 ?>
4 <!DOCTYPE html>
5 <script src="/w3c/resources/testharness.js"></script>
6 <script src="/w3c/resources/testharnessreport.js"></script>
7 <body>
8 <script>
9 var t = async_test('Client-Hints sent when Aceept-CH header is present') ;
10 var body = document.body;
11 var unreached = function() {
12 assert_unreached("Image should have loaded.");
13 };
14
15 var loadRWImage = function() {
16 var img = new Image();
17 img.src = 'resources/image-checks-for-rw.php';
18 img.onload = t.step_func(function(){ t.done(); });
19 img.onerror = t.step_func(unreached);
20 body.appendChild(img);
21 };
22 t.step(function() {
23 var img = new Image();
24 img.src = 'resources/image-checks-for-dpr.php';
25 img.onload = t.step_func(loadRWImage);
26 img.onerror = t.step_func(unreached);
27 body.appendChild(img);
28 });
29 </script>
30 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698