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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/w3c/resources/testharness.js"></script>
3 <script src="/w3c/resources/testharnessreport.js"></script>
4 <body>
5 <script>
6 var t = async_test('Client-Hints not sent when Aceept-CH header is not p resent');
Mike West 2015/02/25 11:37:11 Nit: s/Aceept/Accept/
7 var body = document.body;
8 var unreached = function() {
9 assert_unreached("Image should not have loaded.");
10 };
11
12 var loadRWImage = function() {
13 var img = new Image();
14 img.src = 'resources/image-checks-for-rw.php';
15 img.onload = t.step_func(unreached);
16 img.onerror = t.step_func(function(){ t.done(); });
17 body.appendChild(img);
18 };
19 t.step(function() {
20 var img = new Image();
21 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
22 img.onload = t.step_func(unreached);
23 img.onerror = t.step_func(loadRWImage);
24 body.appendChild(img);
25 });
26 </script>
27 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698