Skip to content

Commit

Permalink
Bug 1859312 [wpt PR 42558] - LoAF: Deflake some tests that time out, …
Browse files Browse the repository at this point in the history
…a=testonly

Automatic update from web-platform-tests
LoAF: Deflake some tests that time out

- Add long timeout to loaf-blocking-duration
- Split iframe & popup tests, to avoid long timeout

Bug: 1479161
Bug: 1462683
Change-Id: Ic3b4b3a08a8900332fc8233e7383a8806805ec69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4942197
Commit-Queue: Noam Rosenthal <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1210211}

--

wpt-commits: c71b71b002b58c722e82767e12107862793eaed0
wpt-pr: 42558
  • Loading branch information
noamr authored and moz-wptsync-bot committed Oct 26, 2023
1 parent e5e21f4 commit b1e389c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Long Animation Frame Timing: basic</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Long Animation Frame Timing: iframes & popups</title>
<title>Long Animation Frame Timing: iframes</title>
<meta name="timeout" content="long">
<body>
<script src="/resources/testharness.js"></script>
Expand Down Expand Up @@ -39,14 +39,6 @@
}, [very_long_frame_duration]), t);
}, 'A long busy wait in a same-origin requestAnimationFrame is a long animation frame');

promise_test(async t => {
const [executor] = await prepare_exec_popup(t, ORIGIN);
await expect_no_long_frame(() => executor.execute_script((duration) => {
const deadline = performance.now() + duration;
while (performance.now() < deadline) {}
}, [very_long_frame_duration]), t);
}, 'A long busy wait in a same-origin popup is a not long animation frame');

for (const origin of ["ORIGIN", "REMOTE_ORIGIN", "HTTP_NOTSAMESITE_ORIGIN"]) {
promise_test(async t => {
const [executor] = await prepare_exec_iframe(t, host_info[origin]);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Long Animation Frame Timing: popups</title>
<meta name="timeout" content="long">
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/common/utils.js"></script>
<script src="/common/dispatcher/dispatcher.js"></script>
<script src="resources/utils.js"></script>
<div id="log"></div>
<script>
const host_info = get_host_info();
const { ORIGIN } = host_info;

promise_test(async t => {
const [executor] = await prepare_exec_popup(t, ORIGIN);
await expect_no_long_frame(() => executor.execute_script((duration) => {
const deadline = performance.now() + duration;
while (performance.now() < deadline) {}
}, [very_long_frame_duration]), t);
}, 'A long busy wait in a same-origin popup is a not long animation frame');
</script>
</body>

0 comments on commit b1e389c

Please sign in to comment.