mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibURL: Remove unspecified steps in URL file slash parsing state
There were some extra steps in there which produced wrong results for relative file URLs. Fixes 7 test cases in: https://wpt.live/url/url-constructor.any.html We also need to adjust the test results in TestURL. The behaviour tested does not match how URL is specified to work as an absolute relative is given.
This commit is contained in:
parent
1d12cb69d4
commit
8723f72f0f
Notes:
github-actions[bot]
2024-08-06 06:59:00 +00:00
Author: https://github.com/shannonbooth
Commit: 8723f72f0f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/985
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 24 additions and 5 deletions
|
@ -196,7 +196,9 @@ TEST_CASE(file_url_serialization)
|
|||
TEST_CASE(file_url_relative)
|
||||
{
|
||||
EXPECT_EQ(URL::URL("https://vkoskiv.com/index.html"sv).complete_url("/static/foo.js"sv).serialize(), "https://vkoskiv.com/static/foo.js");
|
||||
EXPECT_EQ(URL::URL("file:///home/vkoskiv/test/index.html"sv).complete_url("/static/foo.js"sv).serialize(), "file:///home/vkoskiv/test/static/foo.js");
|
||||
EXPECT_EQ(URL::URL("file:///home/vkoskiv/test/index.html"sv).complete_url("/static/foo.js"sv).serialize(), "file:///static/foo.js");
|
||||
EXPECT_EQ(URL::URL("https://vkoskiv.com/index.html"sv).complete_url("static/foo.js"sv).serialize(), "https://vkoskiv.com/static/foo.js");
|
||||
EXPECT_EQ(URL::URL("file:///home/vkoskiv/test/index.html"sv).complete_url("static/foo.js"sv).serialize(), "file:///home/vkoskiv/test/static/foo.js");
|
||||
}
|
||||
|
||||
TEST_CASE(about_url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue