haikuwebkit/LayoutTests/imported/w3c/web-platform-tests/navigation-timing
Alex Christensen e0603b0f62 Document load events should update timing in PerformanceNavigationTiming even after its instantiation
https://bugs.webkit.org/show_bug.cgi?id=229181

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-17
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:

Source/WebCore:

When we make a PerformanceNavigationTiming object, we copy the DocumentLoadTiming and DocumentEventTiming values.
If PerformanceNavigationTiming is accessed before the document has finished loading, we still need to update the timing values.

Covered by a newly passing WPT test, which Chrome and Firefox already pass.

* dom/Document.cpp:
(WebCore::Document::documentEventTimingFromNavigationTiming):
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* loader/DocumentLoadTiming.h:
(WebCore::DocumentLoadTiming::setLoadEventStart):
(WebCore::DocumentLoadTiming::setLoadEventEnd):
(WebCore::DocumentLoadTiming::markLoadEventStart): Deleted.
(WebCore::DocumentLoadTiming::markLoadEventEnd): Deleted.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
* page/Performance.h:
* page/PerformanceNavigationTiming.h:

LayoutTests:

* TestExpectations:
* platform/mac-wk1/TestExpectations:
This test now always passes in WK2.

Canonical link: https://commits.webkit.org/240601@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-17 17:30:54 +00:00
..
resources
META.yml
buffered-flag.window-expected.txt Fix some PerformanceNavigationTiming bugs 2021-06-24 02:06:53 +00:00
buffered-flag.window.html Fix some PerformanceNavigationTiming bugs 2021-06-24 02:06:53 +00:00
buffered-flag.window.js
dom_interactive_image_document-expected.txt
dom_interactive_image_document.html
dom_interactive_media_document-expected.txt
dom_interactive_media_document.html
idlharness.window.js
nav2_test_attributes_exist-expected.txt Implement off-by-default experimental feature for PerformanceResourceTiming.transferSize, encodedBodySize, and decodedBodySize 2021-06-04 18:35:42 +00:00
nav2_test_attributes_exist.html
nav2_test_attributes_values-expected.txt Document load events should update timing in PerformanceNavigationTiming even after its instantiation 2021-08-17 17:30:54 +00:00
nav2_test_attributes_values.html
nav2_test_document_open-expected.txt
nav2_test_document_open.html
nav2_test_document_replaced-expected.txt
nav2_test_document_replaced.html
nav2_test_frame_removed-expected.txt
nav2_test_frame_removed.html
nav2_test_instance_accessible_from_the_start-expected.txt
nav2_test_instance_accessible_from_the_start.html
nav2_test_instance_accessors-expected.txt Add support for Navigation Timing Level 2 2021-05-20 00:33:02 +00:00
nav2_test_instance_accessors.html
nav2_test_navigate_iframe-expected.txt
nav2_test_navigate_iframe.html
nav2_test_navigate_within_document-expected.txt
nav2_test_navigate_within_document.html
nav2_test_navigation_type_backforward-expected.txt
nav2_test_navigation_type_backforward.html
nav2_test_navigation_type_navigate-expected.txt
nav2_test_navigation_type_navigate.html
nav2_test_navigation_type_reload-expected.txt
nav2_test_navigation_type_reload.html
nav2_test_redirect_chain_xserver_final_original_origin-expected.txt
nav2_test_redirect_chain_xserver_final_original_origin.html
nav2_test_redirect_chain_xserver_partial_opt_in-expected.txt
nav2_test_redirect_chain_xserver_partial_opt_in.html Add support for Navigation Timing Level 2 2021-05-20 00:33:02 +00:00
nav2_test_redirect_none-expected.txt
nav2_test_redirect_none.html
nav2_test_redirect_server-expected.txt Fix WPT test resource-timing/cross-origin-redirects.html 2021-06-03 01:25:53 +00:00
nav2_test_redirect_server.html Fix WPT test resource-timing/cross-origin-redirects.html 2021-06-03 01:25:53 +00:00
nav2_test_redirect_xserver-expected.txt
nav2_test_redirect_xserver.html
nav2_test_unique_nav_instances-expected.txt Fix some PerformanceNavigationTiming bugs 2021-06-24 02:06:53 +00:00
nav2_test_unique_nav_instances.html
po-navigation-expected.txt
po-navigation.html
secure-connection-start-reuse.https-expected.txt
secure-connection-start-reuse.https.html
secure_connection_start_non_zero.https-expected.txt Implement off-by-default experimental feature for PerformanceResourceTiming.transferSize, encodedBodySize, and decodedBodySize 2021-06-04 18:35:42 +00:00
secure_connection_start_non_zero.https.html
supported_navigation_type.any-expected.txt
supported_navigation_type.any.html
supported_navigation_type.any.js
supported_navigation_type.any.worker-expected.txt
supported_navigation_type.any.worker.html
supported_navigation_type.window.js
test_document_onload-expected.txt Implement off-by-default experimental feature for PerformanceResourceTiming.transferSize, encodedBodySize, and decodedBodySize 2021-06-04 18:35:42 +00:00
test_document_onload.html
test_document_open-expected.txt
test_document_open.html
test_document_readiness_exist-expected.txt
test_document_readiness_exist.html
test_navigate_within_document-expected.txt
test_navigate_within_document.html
test_navigation_attributes_exist-expected.txt
test_navigation_attributes_exist.html
test_navigation_redirectCount_none-expected.txt
test_navigation_redirectCount_none.html
test_navigation_type_backforward-expected.txt
test_navigation_type_backforward.html
test_navigation_type_enums-expected.txt
test_navigation_type_enums.html
test_navigation_type_reload-expected.txt
test_navigation_type_reload.html
test_no_previous_document-expected.txt
test_no_previous_document.html
test_performance_attributes.sub-expected.txt
test_performance_attributes.sub.html
test_performance_attributes_exist-expected.txt
test_performance_attributes_exist.html
test_performance_attributes_exist_in_object-expected.txt
test_performance_attributes_exist_in_object.html
test_readwrite-expected.txt Remove trailing spaces from expected.txt files in web-platform-tests/[i-v]* 2020-09-27 04:43:02 +00:00
test_readwrite.html
test_timing_attributes_exist-expected.txt
test_timing_attributes_exist.html
test_timing_attributes_order-expected.txt
test_timing_attributes_order.html
test_timing_client_redirect-expected.txt
test_timing_client_redirect.html
test_timing_reload-expected.txt
test_timing_reload.html
test_timing_server_redirect-expected.txt
test_timing_server_redirect.html
test_timing_xserver_redirect-expected.txt
test_timing_xserver_redirect.html
test_unique_performance_objects-expected.txt
test_unique_performance_objects.html
unload-event-same-origin-check-expected.txt
unload-event-same-origin-check.html