Store JavaScript bytecode side data in the WebContent HTTP memory cache and replay it when serving cached responses. Also update an already-complete memory-cache entry when asynchronous bytecode cache generation finishes, so the first source-only response does not keep shadowing the disk-cache sidecar during same-process navigations. Keep the HTTP memory-cache backfill keyed with the request headers that populated the memory-cache entry, so Vary responses still receive their generated bytecode sidecar. Add LibHTTP coverage for round-tripping bytecode side data through a memory-cache entry, attaching it after the response body has already been cached, and matching Vary headers during updates. Add LibWeb coverage for preserving the memory-cache request headers when cloning responses.
47 lines
1.7 KiB
CMake
47 lines
1.7 KiB
CMake
set(TEST_SOURCES
|
|
TestCSSIDSpeed.cpp
|
|
TestContentBlocker.cpp
|
|
TestControlMessageQueue.cpp
|
|
TestCSSInheritedProperty.cpp
|
|
TestCSSPixels.cpp
|
|
TestCSSStyleSheetInvalidation.cpp
|
|
TestCSSSyntaxParser.cpp
|
|
TestCSSTokenizer.cpp
|
|
TestCSSTokenStream.cpp
|
|
TestFetchResponse.cpp
|
|
TestFetchURL.cpp
|
|
TestHTMLTokenizer.cpp
|
|
TestMicrosyntax.cpp
|
|
TestMimeSniff.cpp
|
|
TestNumbers.cpp
|
|
TestRefCountedTreeNode.cpp
|
|
TestSecureContexts.cpp
|
|
TestSourceHighlighter.cpp
|
|
TestStrings.cpp
|
|
)
|
|
|
|
foreach(source IN LISTS TEST_SOURCES)
|
|
ladybird_test("${source}" LibWeb LIBS LibWeb)
|
|
endforeach()
|
|
|
|
ladybird_utility(css-tokenizer SOURCES css-tokenizer.cpp LIBS LibFileSystem LibMain LibWeb)
|
|
|
|
target_link_libraries(TestContentBlocker PRIVATE LibURL)
|
|
target_link_libraries(TestControlMessageQueue PRIVATE LibSync)
|
|
target_link_libraries(TestFetchResponse PRIVATE LibGC LibHTTP LibJS)
|
|
target_link_libraries(TestFetchURL PRIVATE LibURL)
|
|
target_link_libraries(TestSecureContexts PRIVATE LibURL)
|
|
target_link_libraries(TestSourceHighlighter PRIVATE LibURL LibWebView)
|
|
|
|
if (NOT WIN32)
|
|
add_custom_target(test-css-tokenizer ALL DEPENDS css-tokenizer "${CMAKE_BINARY_DIR}/bin/test-css-tokenizer")
|
|
add_custom_command(
|
|
OUTPUT "${CMAKE_BINARY_DIR}/bin/test-css-tokenizer"
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${ladybird_SOURCE_DIR}/Tests/LibWeb/test-css-tokenizer.py" "${CMAKE_BINARY_DIR}/bin/test-css-tokenizer"
|
|
DEPENDS "${ladybird_SOURCE_DIR}/Tests/LibWeb/test-css-tokenizer.py"
|
|
)
|
|
add_test(NAME test-css-tokenizer COMMAND "${CMAKE_BINARY_DIR}/bin/test-css-tokenizer")
|
|
set_tests_properties(test-css-tokenizer PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})
|
|
endif()
|
|
|
|
add_subdirectory("test-web")
|