From 2156de717297737e5607ed6d9dc2e4a6b031d388 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 7 Oct 2024 20:16:21 -0600 Subject: [PATCH] LibWeb: Spoof the ESO's creation url in tests This is necessary when we add more ServiceWorker capabilities, that actually check this value. The more this spoof functionality is used, the more we'll need to actually support serving test files over https. --- Userland/Libraries/LibWeb/Internals/Internals.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibWeb/Internals/Internals.cpp b/Userland/Libraries/LibWeb/Internals/Internals.cpp index c3a4c4dd448..9fa96ae760e 100644 --- a/Userland/Libraries/LibWeb/Internals/Internals.cpp +++ b/Userland/Libraries/LibWeb/Internals/Internals.cpp @@ -148,6 +148,7 @@ void Internals::spoof_current_url(String const& url_string) auto& window = internals_window(); window.associated_document().set_url(url); window.associated_document().set_origin(origin); + HTML::relevant_settings_object(window.associated_document()).creation_url = url; } JS::NonnullGCPtr Internals::create_internal_animation_timeline()