diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 85a82cc0d1b..0e4db3b9b6c 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -297,7 +297,7 @@ void HTMLObjectElement::queue_element_task_to_run_object_representation_steps() auto& realm = this->realm(); auto& global = document().realm().global_object(); - if (response->is_network_error()) { + if (response->is_network_error() || !Fetch::Infrastructure::is_ok_status(response->status())) { resource_did_fail(); return; } diff --git a/Tests/LibWeb/Layout/expected/object-fallback.txt b/Tests/LibWeb/Layout/expected/object-fallback.txt new file mode 100644 index 00000000000..5a40a9f2c57 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/object-fallback.txt @@ -0,0 +1,14 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x34 [BFC] children: not-inline + BlockContainer
at (8,8) content-size 784x18 children: inline + InlineNode