https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 36857c5f01b941752b8877902dccd8b7b01202be authored by Tooru Fujisawa on 02 October 2018, 08:23:59 UTC
Do not raise error if jstests.py is executed without virtualenv on non-automation.
Tip revision: 36857c5
supported-in-source-type.html
<!DOCTYPE html>
<title>Animated PNG MIME type (image/apng) is recognized by &lt;source type></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function resolveUrl(relativeUrl) {
  var a = document.createElement('a');
  a.href = relativeUrl;
  return a.href;
}

async_test(t => {
  window.onload = t.step_func_done(() => {
    let image = document.querySelector('img');
    let apngSrc = document.querySelector('source');
    assert_equals(image.currentSrc, resolveUrl(apngSrc.srcset));
  });
});
</script>
<picture>
  <source srcset="/images/anim-gr.png" type="image/apng">
  <img src="/images/anim-gr.gif" style="visibility: hidden">
</picture>
back to top