summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2023-04-01LibWeb: Add display grid automated testsmartinfalisse
2023-04-01Tests: Use layout tests placed in subdirectoriesmartinfalisse
Allows organizing layout tests into subdirectories.
2023-04-01LibCompress: Implement block size validation for XZ streamsTim Schumacher
2023-04-01Tests: Document input of the xz_utils_good_1_block_header_1 test caseTim Schumacher
2023-03-30LibWeb: Actually visit rules and media queries in imported style sheetsAndreas Kling
Due to CSSImportRule::has_import_result() being backwards, we never actually entered imported style sheets when traversing style rules or media queries. With this fixed, we no longer need the "collect style sheets" step in StyleComputer, as normal for_each_effective_style_rule() will now actually find all the rules. :^)
2023-03-30LibCompress: Use LZMA context from preexisting dictionaryTim Schumacher
2023-03-30LibCompress: Avoid overflowing the size of uncompressed LZMA2 chunksTim Schumacher
2023-03-30LibCompress: Only require new LZMA2 properties after dictionary resetTim Schumacher
2023-03-30LibCompress: Implement support for multiple concatenated XZ streamsTim Schumacher
2023-03-30LibCompress: Move XZ header validation into the read functionTim Schumacher
The constructor is now only concerned with creating the required streams, which means that it no longer fails for XZ streams with invalid headers. Instead, everything is parsed and validated during the first read, preparing us for files with multiple streams.
2023-03-30LibCompress: Implement proper handling of LZMA end-of-stream markersTim Schumacher
2023-03-29LibWeb: Resolve percentage vertical-align values against line-heightAndreas Kling
...instead of not resolving them at all. :^)
2023-03-28LibWeb: Clamp fit-content widths in flex layout to min/max-widthAndreas Kling
In situations where we need a width to calculate the intrinsic height of a flex item, we use the fit-content width as a stand-in. However, we also need to clamp it to any min-width and max-width properties present.
2023-03-28Tests/LibWeb: Add layout test for layout fix in PR #15780Luke Wilde
Adds a layout test for the fix in 488a979.
2023-03-27LibWeb: Use fit-content width in place of indefinite flex item widthsAndreas Kling
In `flex-direction: column` layouts, a flex item's intrinsic height may depend on its width, but the width is calculated *after* the intrinsic height is required. Unfortunately, the specification doesn't tell us exactly what to do here (missing inputs to intrinsic sizing is a common problem) so we take the solution that flexbox applies in 9.2.3.C and apply it to all intrinsic height calculations within FlexFormattingContext: if the used width of an item is not yet known when its intrinsic height is requested, we substitute the fit-content width instead. Note that while this is technically ad-hoc, it's basically extrapolating the spec's suggestion in one specific case and using it in all cases.
2023-03-27LibWeb: Fix intrinsic sizing early return condition in TFCAliaksandr Kalenik
Early return before running full TFC algorithm is only possible when just table width need to be calculated.
2023-03-27LibTLS: Check if certificate is self signed before importing it as CAFabian Dellwing
2023-03-26Tests/LibWeb: Test flex column item with auto height and max-widthAndreas Kling
This case is important because we have to clamp the width before using it to determine the auto height.
2023-03-26Tests/LibWeb: Add test for flex item auto height with `flex-wrap: wrap`Andreas Kling
2023-03-25LibGfx/JPEG: More support for scans with a single componentLucas CHOLLET
Introduced in 2c98eff, support for non-interleaved scans was not working for frames with a number of MCU per line or column that is odd. Indeed, the decoder assumed that they have scans that include a fabricated MCU like scans with multiple components. This patch makes the decoder handle images with a number of MCU per line or column that is odd. To do so, as in the current decoder state we do not know if components are interleaved at allocation time, we skip over falsely-created macroblocks when filling them. As stated in 2c98eff, this is probably not a good solution and a whole refactor will be welcome. It also comes with a test that open a square image with a side of 600px, meaning 75 MCUs.
2023-03-25LibWeb: Don't allow resolved height of abspos elements to become negativeAndreas Kling
We have to clamp the resulting height to 0 when solving for it.
2023-03-25LibWeb: Don't allow resolved width of abspos elements to become negativeAndreas Kling
We have to clamp the resulting width to 0 when solving for it.
2023-03-25LibWeb: Add out-of-flow boxes to anonymous wrapper block when possibleAndreas Kling
If the previous sibling of an out-of-flow box has been wrapped in an anonymous block, we now stuff the out-of-flow box into the anonymous block as well. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-03-25LibRegex: Make ^ and $ accept all `LineTerminator`s instead of just '\n'Ali Mohammad Pur
Also adds a couple tests.
2023-03-24Tests/LibCrypto: Test block splitting logic for SHA1/SHA256Jelle Raaijmakers
We were not testing this logic and I caused a regression while modifying some of the hashing code, so let's add these. Note that I only added two tests to test both 'families' of implementations for the SHA hashes.
2023-03-22LibWeb: Support loading file:// URLs via fetch (through ResourceLoader)Andreas Kling
This builds on the existing ad-hoc ResourceLoader code for HTTP fetches which works for files as well. This also includes a test that checks that stylesheets loaded with the "file" URL scheme actually work.
2023-03-21LibGfx: Move all image loaders and writers to a subdirectoryLucas CHOLLET
2023-03-21Everywhere: Use `LibFileSystem` where trivialCameron Youell
2023-03-21Tests: Add XZ tests from XZ utilsTim Schumacher
2023-03-21Tests: Add tests to verify alpha values are premultiplied when scalingTim Ledbetter
2023-03-20LibWeb: Don't crash on HTML input element with `display: inline`Andreas Kling
This would previously assert in InlineFormattingContext because we had an outwardly inline box that wasn't inwardly flow. Fix this by converting text-based input boxes to inline-blocks. This is an ad-hoc solution, and there might be a much better way to solve it.
2023-03-20Tests: Add LZMA test files from the LZMA specificationTim Schumacher
2023-03-19LibWeb: Apply border-radius clip only if overflow hidden for both axisAliaksandr Kalenik
Before this change `apply_clip_overflow_rect` might crash trying to access `clip_rect` that does not have value because we currently support calculation of visible rectangle when `overflow: hidden` is applied for both axis.
2023-03-19Tests: Correct FLAC spec test pathskleines Filmröllchen
This makes the path consistent with Lagom in the next commit, so that the test binary doesn't need special cases for the two platforms.
2023-03-19Tests: Refactor FLAC spec test to not use a TestCase subclasskleines Filmröllchen
The deallocation of the test cases at the very end happens through a NonnullRefPtr<TestCase>, meaning the deallocation will assume the wrong object size and trip up ASAN. Therefore, we cannot use a TestCase subclass. I also took this opportunity and made use of the new LoaderError formatter.
2023-03-18Tests/LibWeb: Add two tests for lh and rlh unitsSimon Wanner
2023-03-18LibWeb: Treat flex item's cyclic percentage cross size as autoAndreas Kling
This fixes an issue where e.g `height: 100%` on a flex item whose container has indefinite height was being resolved to 0. It now correctly behaves the same as auto.
2023-03-17LibJS: Propagate errors from VM creationTimothy Flynn
2023-03-16Tests: Rework TLS test to use new cacert.pemFabian Dellwing
2023-03-16LibGfx: Add test for serialized bytes of built-in sRGB profileNico Weber
2023-03-16LibWeb: Don't drop single <br/> linesMathis Wiehl
Previously, when having inline contexts consisting of just a `<br/>` tag, we would not create a line box. Ensure that there is always a line box when a line is explicitly being broken and also ensure it won't be trimmed due to being empty. This will a fix a number of sites that use `<br>` tags for layouts between block elements (even though the spec says they shouldn't).
2023-03-15AK: Clear OrderedHashTable previous/next pointers on removalJelle Raaijmakers
With Clang, the previous/next pointers in buckets of an `OrderedHashTable` are not cleared when a bucket is being shifted up as a result of a removed bucket. As a result, an unfortunate pointer mixup could lead to an infinite loop in the `HashTable` iterator, which was exposed in `HashMap::keys()`. Co-authored-by: Luke Wilde <lukew@serenityos.org>
2023-03-15Tests/LibWeb: Add ACID1 as a layout testAndreas Kling
This will help us catch any future regressions immediately.
2023-03-15LibWeb: Make sure `float: left` boxes get pushed down if they can't fitAndreas Kling
2023-03-14AK: Rename CaseInsensitiveStringViewTraits to reflect intentgustrb
Now it is called `CaseInsensitiveASCIIStringViewTraits`, so we can be more specific about what data structure does it operate onto. ;)
2023-03-14LibWeb/Tests: Remove image from a testAndreas Kling
The image made the test flaky when running on my machine, so this doesn't seem safe at the moment. We can just hardcode the dimensions. Eventually we should make it possible to use external images in tests, but for now let's not flake up the CI.
2023-03-14LibWeb: Consider margins of atomic inlines in layoutMathis Wiehl
According to CSS Inline Layout Module Level 3 § 2.2 Step 1. atomic inlines should be layed out in a line box based on their margin box. However, up until this patch we were unconditionally considering only the border box during line box height calculation. This made us essentially drop all vertical margins for atomic inlines.
2023-03-13Everywhere: Remove unintentional partial stream reads and writesTim Schumacher
2023-03-13AK: Rename Stream::write_entire_buffer to Stream::write_until_depletedTim Schumacher
No functional changes.
2023-03-13AK: Rename Stream::read_entire_buffer to Stream::read_until_filledTim Schumacher
No functional changes.