Commit graph

106 commits

Author SHA1 Message Date
Luke Wilde
40bb50ac60 LibWeb: Parse and propagate the iframe sandbox attribute 2025-08-07 19:24:39 +02:00
Jelle Raaijmakers
59a867d3e3 Tests: Enable all screenshot tests on all platforms
Some checks are pending
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
With the newly supported fuzzy matching in our test-web runner, we can
now define the expected maximum color channel and pixel count errors per
failing test and set a baseline they should not exceed.

The figures I added to these tests all come from my macOS M4 machine.
Most discrepancies seem to come from color calculations being slightly
off.
2025-07-17 12:59:11 +01:00
Jelle Raaijmakers
616a2af23d Tests: Enable screenshot tests on arm64
Of the available 71 screenshot tests that we have, 42 fail on macOS
arm64. Let's make it possible to skip those and run the remaining
succeeding screenshot tests on arm64 anyway.
2025-07-16 08:36:14 +02:00
Luke Wilde
d08d6b08d3 LibWeb: Use enum for serialization and reimplement interface exposure
Our currently implementation of structured serialization has a design
flaw, where if the serialized/transferred type was not used in the
destination realm, it would not be seen as exposed and thus we would
not re-create the type on the other side.

This is very common, for example, transferring a MessagePort to a just
inserted iframe, or the just inserted iframe transferring a MessagePort
to it's parent. This is what Google reCAPTCHA does.

This flaw occurred due to relying on lazily populated HashMaps of
constructors, namespaces and interfaces. This commit changes it so that
per-type "is exposed" implementations are generated.

Since it no longer relies on interface name strings, this commit
changes serializable types to indicate their type with an enum,
in line with how transferrable types indicate their type.

This makes Google reCAPTCHA work on https://www.google.com/recaptcha/api2/demo
It currently doesn't work on non-Google origins due to a separate
same-origin policy bug.
2025-07-15 09:20:02 -04:00
Ben Eidson
3aff12bbab LibWeb/WebAudio: Implement AudioNode::disconnect()
Destubs AudioNode::disconnect() and its related overloads.

Ensures that inverse connections are properly removed
when disconnecting AudioNodeConnections. Adds associated
WPT but skips them for now because they rely on
OfflineRenderContext::start_rendering to be fully implemented.
2025-07-09 17:52:06 -06:00
Jelle Raaijmakers
1eb581815a Tests: Unskip selection-over-multiple-code-units.html test
The flake was reproducible by running the entire LibWeb test suite over
and over again with sanitizers enabled. By making the test async and run
at window `load` time instead of document `DOMContentLoaded` time, I've
not been able to reproduce the issue locally.

Ideally I was able to find the underlying cause for this bug, but for
now I'd rather run this regression test.
2025-07-03 10:27:39 +01:00
Shannon Booth
02e6618554 Tests: Disable flaky selection-over-multiple-code-units test
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This is flaky in CI.
2025-07-01 03:42:28 +01:00
Aliaksandr Kalenik
c2c9348636 LibWeb: Print FIXME instead of throwing NotSupportedError in WebAudio
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-universal2, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This allows us to browse https://pierre.co/ instead of being navigated
to error screen.
2025-05-28 20:37:35 +02:00
Sam Atkins
bb035fbfe0 Tests: Import a whole bunch of WPT mediaqueries tests
A lot of these are ref-tests, so I'm skipping the failing ones for now,
and will make as many pass as possible in subsequent commits.
2025-05-23 10:17:58 +01:00
Timothy Flynn
17364c6d36 Tests: Disable XMLHttpRequest-override-mimetype-blob.html for now
It is extremely slow on macOS.
2025-05-22 18:40:25 -04:00
Tim Ledbetter
5dc507c573 Tests: Re-enable some ref tests that now pass 2025-05-19 14:12:25 +01:00
Tim Ledbetter
2f71f563c6 Tests: Re-enable HTML parsing tests that previously crashed 2025-05-19 14:12:25 +01:00
Tim Ledbetter
c4d298674b Tests: Re-enable interpolation tests
These run significantly faster than they did when they did when they
were disabled.
2025-05-19 11:31:47 +01:00
Tim Ledbetter
09f4d90594 LibWeb: Clamp interpolated values to the range of their numeric type
This fixes a UBSAN warning that we previously hit when interpolating
color values.
2025-05-19 11:31:47 +01:00
Tim Ledbetter
7d7bab7cac LibWeb: Ensure resolved border-width values are non-negative 2025-05-19 09:55:09 +02:00
aplefull
71a4e18bf8 LibGfx: Only include frames with fcTL chunks in the animation
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Before this change, IDAT data was mistakenly always included in the
animation. Now we only include frames with explicit fcTL chunks.

As per the PNG spec (third edition):
"The static image may be included as the first frame of the animation
by the presence of a single fcTL chunk before IDAT. Otherwise, the
static image is not part of the animation."

We also fall back to the IDAT data when APNG has acTL but no fcTL
chunks. Test image is 062.png from fDAT-inherits-cICP.html from WPT.
2025-05-01 10:30:00 +02:00
Sam Atkins
107d0cafcf Tests: Disable flaky APNG test
This frequently flakes on CI.
2025-04-30 11:34:19 +01:00
stelar7
dde80a434c LibWeb/IDB: Disable test that now hits a timeout 2025-04-29 17:06:17 +02:00
Tim Ledbetter
16e83f0b35 Tests: Remove some animation tests from the ignore list
These tests are relevant to the fixes being made in later commits
2025-04-23 09:13:45 +01:00
Sam Atkins
405785f584 Tests: Disable 3 tests that are flaky on CI 2025-04-02 16:08:53 +01:00
Aliaksandr Kalenik
7248748157 Tests: Disable WebAnimations/animation-methods/updatePlaybackRate.html
This test is timing-sensitive, similar to some other animation tests we
had to disable, and starts failing on CI after the change in upcoming
commit, so let's disable it for now.
2025-04-01 12:17:52 +02:00
sideshowbarker
a7cb2424af Tests: Skip the svg-inline-sizing/svg-inline.html for now
See https://github.com/LadybirdBrowser/ladybird/issues/3911. The
html/rendering/replaced-elements/svg-inline-sizing/svg-inline.html WPT
test is causing a hang/timeout that prevents being able to run the test
suite to completion.
2025-03-26 10:19:27 +00:00
Aliaksandr Kalenik
564cd1849b Tests: Disable css/css-lists/list-style-type-string-004.html
259d39cb was not enough to make this test pass reliably, so let's
disable it back for now.
2025-03-19 00:26:40 +01:00
Aliaksandr Kalenik
31da70bbfc Tests/LibWeb: Enable some tests relying on "reftest-wait" 2025-03-18 20:09:46 +01:00
Sam Atkins
6d3534ae9c Tests: Disable fDAT-inherits-cICP.html test that uses "reftest-wait"
We don't support this mechanism in our test runner yet, which makes this
test flaky.
2025-03-18 14:56:02 +00:00
Aliaksandr Kalenik
2f9d2acdb2 Tests: Disable css-contain/contain-style-remove-element-crash.html
Disabling this test because it very often crashes on CI
https://github.com/LadybirdBrowser/ladybird/issues/3894
2025-03-13 19:31:26 +01:00
Tommy van der Vorst
89f8dd9b3b Tests: Do not use data URI in css-mask-longhand test
Instead use an existing image and ensure it loads to prevent
flakiness
2025-03-11 12:16:32 -04:00
Timothy Flynn
292b566b9f Tests: Disable flaky css-mask-longhand test 2025-03-05 14:45:56 -05:00
Timothy Flynn
436f3f99a1 Tests: Disable some particularly slow WPT rendering tests
In an effort to help with such frequent timeouts in CI.
2025-02-24 08:07:24 -05:00
Andreas Kling
01c659ce9b Tests: Skip most (but not all) write/write_single HTML parser tests
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
These are causing too many macOS CI timeouts, so let's focus on only
running the ones that add completely new parser coverage (i.e new
variants of the tests that were already skipped.)
2025-02-20 14:32:13 +01:00
Tim Ledbetter
4227f5d6c5 Tests: Skip tests that rely on the reftest-wait mechanism
The WPT runner uses this mechanism to delay test completion. This is
not supported by our runner and causes tests that use it to be flaky.
2025-02-12 02:12:41 +01:00
Aliaksandr Kalenik
eef678223a Tests: Disable wpt-import/css/CSS2/floats/block-in-inline-become-float 2025-02-06 20:07:11 +01:00
Aliaksandr Kalenik
ff9410676e Tests: Disable WebAnimations/animation-properties/currentTime.html
This test appears to be flaky, similar to some other animation tests we
have. Let's disable it for now because changes in subsequent commits
cause it to fail more often, even though those changes are not related
to the test itself. It is likely another case where altered timings of
certain operations (specifically, style updates) cause the test to fail
because things are no longer executed in the same order as before.
2025-02-06 20:07:11 +01:00
Timothy Flynn
19ab213b16 LibWeb: Disable the beforeunload-canceling test for now
It is causing whatever test that follows to time out very consistently.
2025-02-04 19:31:47 -05:00
Tim Ledbetter
fac88b698f LibWeb: Disable time origin WPT test
This test's use of Workers causes intermittent failures on MacOS.
2025-01-30 18:37:53 +01:00
Tim Ledbetter
0fd8270783 LibWeb: Disable flaky navigation timing test 2025-01-30 18:37:53 +01:00
Jelle Raaijmakers
0cb35c9294 Tests: Disable flaky ref-tests for now
These were introduced in 67ed676831 and fail for half of the time on my
machine.
2025-01-29 11:05:24 +00:00
Ryan Liptak
1ba15e1fa3 LibWeb: Fix hex character references accepting all alphabetic ASCII
Instead of just A-F/a-f, any char A-Z/a-z was being accepted as a valid
hexadecimal digit.
2025-01-07 00:43:41 +01:00
Ryan Liptak
752deaf6ef LibWeb: Don't skip named-character-references test
This already passes, so there's no reason to skip it anymore
2025-01-07 00:43:41 +01:00
Tim Ledbetter
e049085f47 Tests: Remove support files from TestConfig.ini 2024-12-29 01:20:48 +00:00
Lucas CHOLLET
c70431672e Tests/LibWeb: Remove some support files from TestConfig.ini
Since 8e34efd4b5, these files are detected
by the runner and already skipped.
2024-12-23 10:59:47 -08:00
Sam Atkins
1c9f0601e9 Tests: Re-enable slow WPT svg-in-iframe/object tests
These all use `<meta name=timeout content=long>` and so should now be
safe to run without timing out.

Fixes #2792
2024-12-19 17:27:33 +00:00
Sam Atkins
2c3f826162 Tests: Disable crashing css-hover-shadow-dom.html test 2024-12-13 16:11:02 +00:00
rmg-x
7a0c675f45 Tests/LibWeb: Re-enable "test-http-test-server" test
Previously, this test was disabled for flakiness.
2024-12-05 17:02:57 -07:00
Timothy Flynn
aa3500e881 LibWeb: Re-disable SVG rendering tests
This partially reverts commit f1bbba2ba5.

These tests are frequently timing out on macOS CI.
2024-12-05 15:28:53 -05:00
Andreas Kling
3f461b96df LibWeb: Implement window.stop()
Fixes a handful of timeouts on WPT.
2024-12-05 12:13:09 +01:00
Tim Ledbetter
f1bbba2ba5 Tests: Enable imported WPT tests that were previously too slow for CI 2024-12-04 21:25:33 +00:00
Sam Atkins
624b4689ac Tests: Remove invalid WPT flexbox test
`css/css-flexbox/order-001.htm` is a ref test that does not include any
page to match against.

https://github.com/web-platform-tests/wpt/issues/49521
2024-12-04 13:33:42 +00:00
Andreas Kling
b1796ebd2c Tests: Import a WPT test that uses HTMLIFrameElement.sandbox.supports() 2024-12-03 15:30:18 +01:00
Timothy Flynn
3947c6d4ed LibWeb: Disable Text/input/wpt-import/css/cssom/serialize-values.html
It's currently too slow for sanitized CI runs.
2024-11-30 12:10:12 -05:00