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

Unified Diff: LayoutTests/http/tests/misc/client-hints-no-accept.html

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
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>
« no previous file with comments | « LayoutTests/http/tests/misc/client-hints-accept.php ('k') | LayoutTests/http/tests/misc/resources/image-checks-for-dpr.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698