Skip to content

Commit 25457ae

Browse files
Fix race in softnavs WPT interaction-with-paint-before-back.tentative.html. (#52259)
Same pattern as cr/6499490: We should create the promise before the click, so that we don't miss the softnavs perf entry. I'm thinking this means we can re-enable the test in the expectations. Change-Id: Ie6ffbc9eea4319ce1a6e12ef262459aab550681b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6500153 Reviewed-by: Annie Sullivan <sullivan@chromium.org> Commit-Queue: Johannes Henkel <johannes@chromium.org> Cr-Commit-Position: refs/heads/main@{#1453644} Co-authored-by: Johannes Henkel <johannes@chromium.org>
1 parent f712573 commit 25457ae

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

soft-navigation-heuristics/interaction-with-paint-before-back.tentative.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@
4747
history.back();
4848
});
4949
promise_test(async t => {
50+
const soft_nav_promise = waitOnSoftNav();
5051
if (test_driver) {
5152
test_driver.click(link);
5253
}
53-
await waitOnSoftNav();
54+
await soft_nav_promise;
5455
assert_equals(
5556
document.softNavigations, 1,
5657
'Single Soft Navigation detected');
@@ -70,7 +71,3 @@
7071
</script>
7172
</body>
7273
</html>
73-
74-
75-
76-

0 commit comments

Comments
 (0)