Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / resources / iframe-no-accept-ch.php
blob7d9d6dbfdfc620cdf2462e93c90f25b8abde8439
1 <?php
2 header("ACCEPT-CH: DPR, Width, Viewport-Width");
3 ?>
4 <!DOCTYPE html>
5 <body>
6 <script>
7 var fail = function(num) {
8 return function() {
9 parent.postMessage("fail "+ num, "*");
13 var success = function() {
14 parent.postMessage("success", "*");
17 var loadRWImage = function() {
18 var img = new Image();
19 img.src = 'resources/image-checks-for-width.php';
20 img.sizes = '500';
21 img.onload = fail(3);
22 img.onerror = success;
23 document.body.appendChild(img);
25 var loadViewportImage = function() {
26 var img = new Image();
27 img.src = 'resources/image-checks-for-viewport-width.php';
28 img.onload = fail(2);
29 img.onerror = loadRWImage;
30 document.body.appendChild(img);
32 var img = new Image();
33 img.src = 'resources/image-checks-for-dpr.php';
34 img.onload = fail(1);
35 img.onerror = loadViewportImage;
36 document.body.appendChild(img);
37 </script>
38 </body>