test that setting img src async before window.onload doesn't panic.

This commit is contained in:
Ellen Marie Dash 2017-06-15 17:05:34 -04:00
parent f2631c2010
commit 3ec15aa3df
2 changed files with 25 additions and 0 deletions

View file

@ -13193,6 +13193,12 @@
{}
]
],
"mozilla/img_async_src_set_before_window_load.html": [
[
"/_mozilla/mozilla/img_async_src_set_before_window_load.html",
{}
]
],
"mozilla/img_find_non_sibling_map.html": [
[
"/_mozilla/mozilla/img_find_non_sibling_map.html",
@ -25862,6 +25868,10 @@
"3c4f36abed83367c851d943b1f25b8394de6fe75",
"testharness"
],
"mozilla/img_async_src_set_before_window_load.html": [
"ef8a1a0623d6f6743bd27e47df4dd77535da0d3e",
"testharness"
],
"mozilla/img_find_non_sibling_map.html": [
"d34100c4cc22adcaa1014095ba4b7b929b8e079d",
"testharness"

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<img id="image" src="#">
<script>
async_test(function(t) {
image = document.getElementById('image');
setTimeout(t.step_func_done(function() {
image.src = 'test.png';
}), 0);
}, "Setting src attribute asynchronously on image before window.onload doesn't panic.");
</script>