Update web-platform-tests to revision a357943a203d0d587a30c9aa41c4772a0500ff79

This commit is contained in:
WPT Sync Bot 2018-12-24 20:36:09 -05:00
parent f4aafe8caa
commit 4be16c75d7
12 changed files with 59 additions and 13 deletions

View file

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>404 response with actual image data should be rendered and load event is fired</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<img id="img">
<script>
async_test(t => {
var img = document.getElementById("img");
img.onload = t.step_func_done(e => {
assert_equals(e.type, "load", "image.onload() called");
});
img.onerror = t.unreached_func("image.onerror() was not supposed to be called");
img.src = "404-response-with-actual-image-data.py";
}, "404 response with actual image data should be rendered and load event is fired");
</script>

View file

@ -0,0 +1,3 @@
import base64
def main(req, res):
return 404, [('Content-Type', 'image/png')], base64.decodestring("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=")