summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/orb/tentative/compressed-image-sniffing.sub.html
blob: 38e70c69ad63085b855935aba0f2b42a33b8ba4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!-- Test verifies that compressed images should not be blocked
-->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
async_test(function(t) {
  let url = "http://{{domains[www1]}}:{{ports[http][0]}}"
  url = url + "/fetch/orb/resources/png-unlabeled.png?pipe=gzip"

  const img = document.createElement("img");
  img.src = url;
  img.onerror = t.unreached_func("Unexpected error event")
  img.onload = t.step_func_done(function () {
    assert_true(true);
  })
  document.body.appendChild(img)
}, "ORB shouldn't block compressed images");
</script>