ladybird/UI/Headless
Timothy Flynn 43dc0f52a6 LibWeb: Do not run microtasks when the event loop is paused
For example, running `alert(1)` will pause the event loop, during which
time no JavaScript should execute. This patch extends this disruption to
microtasks. This avoids a crash inside the microtask executor, which
asserts the JS execution context stack is empty.

This makes us behave the same as Firefox in the following page:

    <script>
        queueMicrotask(() => {
            console.log("inside microtask");
        });

        alert("hi");
    </script>

Before the aforementioned assertion was added, we would execute that
microtask before showing the alert. Firefox does not do this, and now
we don't either.
2025-01-19 20:47:50 +00:00
..
Application.cpp LibWebView+WebContent: Inform WebContent process if browser is headless 2024-12-10 10:31:47 -08:00
Application.h headless-browser: Add an option to log per-test durations 2024-11-30 12:10:12 -05:00
CMakeLists.txt CI: Enable verbose logging of LibWeb tests 2024-11-30 12:10:12 -05:00
Fixture.cpp LibWeb: Don't try to wait for HTTP server to exit if kill call fails 2024-12-20 14:59:56 +01:00
Fixture.h LibWebView+UI: Read and set echo server port in HttpEchoServerFixture 2024-12-05 17:02:57 -07:00
HeadlessWebView.cpp UI/Headless: Clear pending data when a test completes 2024-12-18 17:38:53 +00:00
HeadlessWebView.h LibWebView+UI: Handle common WebView client initialization in LibWebView 2024-11-14 11:47:32 +01:00
main.cpp UI: Set headless-browser width and height 2024-11-13 16:52:33 -05:00
Test.cpp LibWeb: Do not run microtasks when the event loop is paused 2025-01-19 20:47:50 +00:00
Test.h headless-browser: Add support for crash tests 2025-01-17 09:08:15 +01:00