Commit graph

50 commits

Author SHA1 Message Date
Tim Ledbetter
bef7e704c5 headless-browser: Add support for crash tests
These are essentially the same as text tests, but they have no
associated expectation file. These tests pass if the test fully loads
without crashing.
2025-01-17 09:08:15 +01:00
Gingeh
6fd03425b2 UI: Prevent crash when right clicking on an unloaded image 2025-01-12 19:29:57 +00:00
Nicolas Ramz
0d92cd1f36 UI/AppKit: Add debug menu to clear all cookies 2025-01-10 14:57:26 +00:00
rmg-x
ba6b5adde3 UI/Qt: Add menu action to clear all cookies 2025-01-05 13:58:27 +00:00
Tyler Dence
5cfed4524d Inspector+UI: Close inspector with shortcuts
This brings keyboard shortcuts for the inspector up with common
convention in FF and Chrome: Ctrl+Shift+C now also opens the inspector,
and F12, Ctrl+W, and Ctrl+Shift+I now close the inspector when the
inspector window is focused.

Resolves #972
2025-01-03 10:47:13 +00:00
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
Jess
61fcccb104 Flake: Add and run formatter + Rename devshell
Add a formatter output to the flake (`nix fmt`), along with moving +
renaming the devshell so it will work by running `nix-shell` in the root
of the project.
2024-12-18 15:15:42 +00:00
Pavel Shliak
ea469fbeab LibGfx: Let Painter care about TinyVG transforms
This helps us with non-uniform scales, and makes things simple
2024-12-14 23:29:43 +01:00
Tim Ledbetter
e764df15eb LibWebView+WebContent: Inform WebContent process if browser is headless 2024-12-10 10:31:47 -08:00
Pavel Shliak
6f81b80114 Everywhere: Include HashMap only where it's actually used 2024-12-09 12:31:16 +01: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
Shannon Booth
0fa54c2327 LibURL+LibWeb: Make URL::serialize return a String
Simplifying a bunch of uneeded error handling around the place.
2024-12-04 16:34:13 +00:00
Sidicer
edf29857f8 UI/Qt: Fix hover_label hiding URLs
m_hover_label did not have checks if the mouse is in the same location.
This caused clickable URLs to be hidden.
Also shortened the label text to not be longer than half of the window.
2024-12-04 16:09:59 +00:00
Pavel Shliak
be0857e390 UI/Qt: Do not pass left shift modifier on every return 2024-12-02 17:57:38 -05:00
Jess
43746ca52d flake: Fix broken dev-shell
Many dependencies aren't currently included in the devShell. As ladybird
is already packaged downstream, we can pull in those buildInputs along
with the extra dev dependencies already defined.
2024-12-01 13:27:59 -05: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
Pavel Shliak
dbfe5be9ff LibGfx: Delete DeprecatedPainter 2024-11-25 21:13:53 +01:00
devgianlu
49c388b891 LibTLS+LibWeb+LibCrypto: Move Certificate to LibCrypto
By moving `Certificate` to `LibCrypto` it is possible to reuse a bunch
of code from in `LibCrypto` itself. It also moves some constants
and pieces of code to a more appropriate place than `LibTLS`.

This also makes future work on WebCryptoAPI easier.
2024-11-25 13:38:38 +01:00
rmg-x
03b9e555c0 Libraries: Remove LibArchive
This library isn't used by anything but the Android build which
currently doesn't work. We most likely won't be using a homegrown
implementation for archive formats in the future, regardless.
2024-11-25 13:37:45 +01:00
Pavel Shliak
39c500ec7c LibGfx: Use Skia for TinyVG rendering 2024-11-25 12:14:24 +01:00
Jelle Raaijmakers
f0bcb07ff7 UI/Qt: Fall back to luma dark mode detection for unknown color scheme
The Qt style hints' color scheme can return ::Unknown, in which case we
still need to fall back to our 'old' method of using the luma component
of the background role color.
2024-11-24 21:02:50 -05:00
Pavel Shliak
6ad93d2b21 UI/Qt: Use Qt-reported dark theme
For Qt >= 6.5, the system theme can be determined reliably, so no
guesswork is needed. A fallback remains for Qt < 6.5, but it is
hacky and less reliable.
2024-11-23 19:53:43 +00: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
a14937c45e LibWebView+Services+UI: Move the Web plugins to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
9e1f001ffe LibWebView+Services+UI: Move the EventLoop implementations to LibWebView
We currently compile the Qt event loop files multiple times, for every
target which wants to use them. This patch moves these to LibWebView as
a central location to avoid this.
2024-11-11 07:35:43 -05:00
Andreas Kling
08ae305dc5 UI/AppKit: Make "Dump GC Graph" menu action actually work again
This was originally implemented as a debug request, but later changed.
The Qt UI already did the right thing, so just copy the logic over.
2024-11-10 19:12:59 +01:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00