diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 0eaab8e58a4..6a4b67a6a92 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -493,6 +493,7 @@ impl HTMLImageElement { request.image = None; request.metadata = None; let document = document_from_node(self); + LoadBlocker::terminate(&mut request.blocker); request.blocker = Some(LoadBlocker::new(&*document, LoadType::Image(url.clone()))); } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index e0694fdb2c0..37f08769d33 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -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": [ + "c7895fe3b7b7f11a4853760e386e12a08bb51b96", + "testharness" + ], "mozilla/img_find_non_sibling_map.html": [ "d34100c4cc22adcaa1014095ba4b7b929b8e079d", "testharness" diff --git a/tests/wpt/mozilla/tests/mozilla/img_async_src_set_before_window_load.html b/tests/wpt/mozilla/tests/mozilla/img_async_src_set_before_window_load.html new file mode 100644 index 00000000000..370d4ef9b8d --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/img_async_src_set_before_window_load.html @@ -0,0 +1,15 @@ + + +