mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
9812031a02
We have code inside LibWeb that uses the `AK::StringUtils::convert_to_uint`and `AK::StringUtils::convert_to_int` methods for parsing integers. This works well for the most part, but according to the spec, trailing characters are allowed and should be ignored, but this is not how the `StringUtil` methods are implemented. This patch adds two new methods named `parse_integer` and `parse_non_negative_integer` inside the `Web::HTML` namespace that uses `StringUtils` under the hood but adds a bit more logic to make it spec compliant.
12 lines
277 B
CMake
12 lines
277 B
CMake
set(TEST_SOURCES
|
|
TestCSSIDSpeed.cpp
|
|
TestCSSPixels.cpp
|
|
TestHTMLTokenizer.cpp
|
|
TestNumbers.cpp
|
|
)
|
|
|
|
foreach(source IN LISTS TEST_SOURCES)
|
|
serenity_test("${source}" LibWeb LIBS LibWeb)
|
|
endforeach()
|
|
|
|
install(FILES tokenizer-test.html DESTINATION usr/Tests/LibWeb)
|