From 79fa892ca1e6f8fed408efe16aec0c6cba7cf288 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Wed, 22 Nov 2023 09:43:07 -0700 Subject: [PATCH] Tests: Add stub for the internals object when not running in test mode This allows developers to open LibWeb test html files in Ladybird or in other browsers to observe their behavior without the internals object. --- Tests/LibWeb/Text/input/include.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/LibWeb/Text/input/include.js b/Tests/LibWeb/Text/input/include.js index 17f982184b..41d9ba674b 100644 --- a/Tests/LibWeb/Text/input/include.js +++ b/Tests/LibWeb/Text/input/include.js @@ -1,5 +1,11 @@ var __outputElement = null; +if (globalThis.internals === undefined) { + internals = { + signalTextTestIsDone: function () {}, + }; +} + function println(s) { __outputElement.appendChild(document.createTextNode(s + "\n")); }