Update WPT tests for embedded content
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / html / semantics / embedded-content / the-img-element / 404-response-with-actual-image-data.html
1 <!DOCTYPE HTML>
2 <meta charset="utf-8">
3 <title>404 response with actual image data should be rendered and load event is fired</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6
7 <img id="img">
8
9 <script>
10   async_test(t => {
11     var img = document.getElementById("img");
12     img.onload = t.step_func_done(e => {
13       assert_equals(e.type, "load", "image.onload() called");
14     });
15     img.onerror = t.unreached_func("image.onerror() was not supposed to be called");
16     img.src = "404-response-with-actual-image-data.py";
17   }, "404 response with actual image data should be rendered and load event is fired");
18 </script>