Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPT: Create function to test BFCache not restored reason #38038

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 18, 2023

Added a function assertBFCacheNotRestoredReasonsIfApplicable that
uses the notRestoredReasons API. Unlike the helper functions in
performance timing API folder, this one only checks the main frame's
reasons, which should be good (and concise) enough for most of the
BFCache feature WPTs.

If the API is not available, the function will return straightaway
instead report assertion failure.

This CL also modifies back-forward-cache-open-connection.window.js
as an example usage of the helper function.

Bug: 1408436
Change-Id: Ia6215ae88bc295b9c2d8c164aab78780ded3606c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4177970
Reviewed-by: Fergal Daly <[email protected]>
Reviewed-by: Yuzu Saijo <[email protected]>
Commit-Queue: Mingyu Lei <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1098432}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4177970 branch 5 times, most recently from 4bede13 to 3767e01 Compare January 26, 2023 02:21
Added a function `assertBFCacheNotRestoredReasonsIfApplicable` that
uses the `notRestoredReasons` API. Unlike the helper functions in
performance timing API folder, this one only checks the main frame's
reasons, which should be good (and concise) enough for most of the
BFCache feature WPTs.

If the API is not available, the function will return straightaway
instead report assertion failure.

This CL also modifies back-forward-cache-open-connection.window.js
as an example usage of the helper function.

Bug: 1408436
Change-Id: Ia6215ae88bc295b9c2d8c164aab78780ded3606c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4177970
Reviewed-by: Fergal Daly <[email protected]>
Reviewed-by: Yuzu Saijo <[email protected]>
Commit-Queue: Mingyu Lei <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1098432}
@WeizhongX
Copy link
Contributor

python3 ./wpt run --channel=nightly --verify --verify-no-chaos-mode --verify-repeat-loop=0 --verify-repeat-restart=10 --github-checks-text-file=/home/test/artifacts/checkrun.md --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --no-headless --verify-log-full --binary=/home/test/build/firefox/firefox firefox

Some affected tests had slow results:

Slow tests

Test Result Longest duration (ms) Timeout (ms)
/IndexedDB/back-forward-cache-open-connection.window.html OK 8487 10000
/performance-timeline/not-restored-reasons/performance-navigation-timing-attributes.tentative.window.html OK 8368 10000
/performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.html OK 9548 10000
/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-bfcache.tentative.window.html OK 9551 10000

These may be pre-existing or newly slow tests. Slow tests indicate that a test ran very close to the test timeout limit and so may become TIMEOUT-flaky in the future. Consider speeding up the test or breaking it into multiple tests. For help, please tag @web-platform-tests/wpt-core-team in a comment.

@WeizhongX
Copy link
Contributor

created crbug.com/1411564. @KyleJu @DanielRyanSmith can you pls admin merge? Thanks!

@KyleJu KyleJu merged commit 5362f7c into master Jan 31, 2023
@KyleJu KyleJu deleted the chromium-export-cl-4177970 branch January 31, 2023 17:56
marcoscaceres pushed a commit that referenced this pull request Mar 28, 2023
Added a function `assertBFCacheNotRestoredReasonsIfApplicable` that
uses the `notRestoredReasons` API. Unlike the helper functions in
performance timing API folder, this one only checks the main frame's
reasons, which should be good (and concise) enough for most of the
BFCache feature WPTs.

If the API is not available, the function will return straightaway
instead report assertion failure.

This CL also modifies back-forward-cache-open-connection.window.js
as an example usage of the helper function.

Bug: 1408436
Change-Id: Ia6215ae88bc295b9c2d8c164aab78780ded3606c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4177970
Reviewed-by: Fergal Daly <[email protected]>
Reviewed-by: Yuzu Saijo <[email protected]>
Commit-Queue: Mingyu Lei <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1098432}

Co-authored-by: Mingyu Lei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants