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

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: 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 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..322f02f473e9803953fddadc1fbf020dfa40ef16
--- /dev/null
+++ b/LayoutTests/http/tests/misc/client-hints-no-accept.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="/w3c/resources/testharness.js"></script>
+<script src="/w3c/resources/testharnessreport.js"></script>
+<body>
+ <script>
+ var t = async_test('Client-Hints not sent when Aceept-CH header is not present');
Mike West 2015/02/25 11:37:11 Nit: s/Aceept/Accept/
+ 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';
Mike West 2015/02/25 11:37:11 Doesn't assigning to `.src` trigger a load right a
+ img.onload = t.step_func(unreached);
+ img.onerror = t.step_func(loadRWImage);
+ body.appendChild(img);
+ });
+ </script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698