Commit graph

29 commits

Author SHA1 Message Date
Tim Ledbetter
c55d40e84b UI/Headless: Ignore more WPT support files
We now ignore files imported from WPT, if they are in the root `common`
directory, or any directory named `resources`. This matches the
behavior of the WPT test harness.
2024-12-29 01:20:48 +00:00
Tim Ledbetter
9585700876 LibWeb: Don't try to wait for HTTP server to exit if kill call fails 2024-12-20 14:59:56 +01:00
Sam Atkins
be6a9940ad headless-browser: Let tests set their own timeout duration
Some tests take longer than others, and so may want to set a custom
timeout so that they pass, without increasing the timeout for all other
tests. For example, this is done in WPT.

Add an `internals.setTestTimeout(milliseconds)` method that overrides
the test runner's default timeout for the currently-run test.
2024-12-19 17:27:33 +00:00
Lucas CHOLLET
8a0c63f168 headless-browser: Stop considering support files from WPT as tests 2024-12-19 09:54:14 +00:00
Sam Atkins
bc971a4ccc UI/Headless: Clear pending data when a test completes
Without this, a crashing ref test is able to take down the entire
process because of the `VERIFY(!m_pending_screenshot);` in
`take_screenshot()`. The dialog/prompt fields were not causing crashes
but clearing them feels more hygienic.
2024-12-18 17:38:53 +00:00
Tim Ledbetter
e764df15eb LibWebView+WebContent: Inform WebContent process if browser is headless 2024-12-10 10:31:47 -08:00
rmg-x
ece611718d LibWebView+UI: Read and set echo server port in HttpEchoServerFixture
This commit adds a "echo_server_port" property to `WebContentOptions`.

Additionally, it makes `Application::web_content_options()` return a
mutable reference instead of a const reference so that we can set the
port value from the fixture.
2024-12-05 17:02:57 -07:00
Tim Ledbetter
2455618995 WebContent+headless-browser: Implement mismatch conditions for ref tests
Ref tests can now have a `<link rel="mismatch">` condition. The test
will pass if the expectation page doesn't match the test page.
2024-12-04 19:50:00 +00:00
Timothy Flynn
c107ffa84f CI: Enable verbose logging of LibWeb tests
We currently have some tests that hang. In order to find which tests
these are, let's enable verbose logging to get a log of each running
test and its individual duration.
2024-11-30 12:10:12 -05:00
Timothy Flynn
ad5de9d4e5 headless-browser: Add an option to log per-test durations
This adds a verbosity option to log the start and end of each test, with
the duration taken for the test. To be able to use this option with our
exisiting verbosity flag, without cluttering stdout with other data, we
add verbosity levels to headless-browser. The level is increased by
providing the -v flag on the command line multiple times.
2024-11-30 12:10:12 -05:00
Timothy Flynn
49eeaaf8fe headless-browser: Store each test's relative path on the Test object
Rather than having to compute it each time we want it.
2024-11-30 12:10:12 -05:00
Tim Ledbetter
2aee5d7f62 headless-browser: Treat files ending in '.htm' as valid tests 2024-11-21 15:49:48 -05:00
Timothy Flynn
077ae6efa1 headless-browser: Create the expectation directory if it doesn't exist
This is convenient when adding tests to a new folder.
2024-11-17 22:37:45 +01:00
Timothy Flynn
4e1dab477a LibWebView+UI: Handle common WebView client initialization in LibWebView
No need to have every UI manually implement these common steps.
2024-11-14 11:47:32 +01:00
Timothy Flynn
44d6601dc5 LibWebView+UI: Handle worker agent requests from within LibWebView
There is no longer any UI-specific facilities needed to launch a worker
agent.
2024-11-14 11:47:32 +01:00
Timothy Flynn
652dde5022 LibWebView+UI: Acquire the paths to helper processes inside LibWebView
We no longer need to acquire these paths from the UI and pass them into
LibWebView - we can figure out these paths internally.
2024-11-14 11:47:32 +01:00
Timothy Flynn
bb7dff7dfe LibWebView+UI: Move ownership of application services to LibWebView
LibWebView now knows how to launch RequestServer and ImageDecoderServer
without help from the UI, so let's move ownership of these services over
to LibWebView for de-duplication.
2024-11-14 11:47:32 +01:00
Timothy Flynn
25c067872c headless-browser: Ensure crashing tests cause LibWeb tests to fail 2024-11-13 19:21:57 -05:00
Pavel Shliak
ce56bc29e2 UI: Set headless-browser width and height 2024-11-13 16:52:33 -05:00
Timothy Flynn
957032809b UI: Send the current system visibility state to new WebContent clients
After a crash, we need to inform the new WebContent process of the
current system visibility state.
2024-11-13 20:36:47 +01:00
Timothy Flynn
83b1db785a LibWebView+WebContent+UI: Remember the current system visibility state
We will want to re-inform WebContent of the system visibility state when
we create a new process after a crash. This changes the IPC to just send
the enum value directly, instead of a boolean, so that we can just store
that enum value directly on the ViewImplementation class.
2024-11-13 20:36:47 +01:00
Timothy Flynn
13b7c26e9f headless-browser: Update visibility after minimizing/restoring windows 2024-11-13 11:01:01 +01:00
Timothy Flynn
e094712e3a headless-browser: Update the viewport when WebDriver resizes the window
When the window resizes, we should also update the viewport to match,
rather than remaining at the hard-coded 800x600 size.
2024-11-13 11:01:01 +01:00
Timothy Flynn
71ccaeda16 headless-browser: Store the viewport size as DevicePixelSize
This will just avoid a bunch of needless conversion to/from IntSize in
and upcoming commit.
2024-11-13 11:01:01 +01:00
Timothy Flynn
70ce8046c3 headless-browser: Handle WebContent crashes similar to the graphical UIs
Instead of bringing the whole browser down, let's re-initialize the
WebContent client so we can move on. This is particularly needed for
WPT.
2024-11-12 14:25:59 +00:00
Timothy Flynn
aa0811d24e headless-browser: Do not log skipped tests by default
We now skip so many tests that the list of skipped tests exceeds the
height of my terminal. Let's skip logging these by default, as it is
too noisy to find actually relevant information.
2024-11-11 16:54:55 +01:00
Timothy Flynn
d2306efaea headless-browser: Replace the log-slowest-tests flag with a verbose flag
Instead of adding a separate flag for each thing we want to log, let's
just have a verbosity flag. We can add verbosity levels later if needed.
2024-11-11 16:54:55 +01:00
Timothy Flynn
0ff91a5273 LibWebView+Services+UI: Move process helpers to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00