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

Unified 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: Removed expected files 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/client-hints-no-accept.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..97ce2dc08d9fa3b577e270d963359b89005ecae8
--- /dev/null
+++ b/LayoutTests/http/tests/misc/client-hints-accept.php
@@ -0,0 +1,29 @@
+<?php
+ header("ACCEPT-CH: DPR, RW");
+?>
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<body>
+ <script>
+ var t = async_test('Client-Hints sent when Accept-CH header is present');
+ 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);
+ document.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);
+ document.body.appendChild(img);
+ });
+ </script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/client-hints-no-accept.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698