-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LoAF: Separate iframe tests to 3 files
This should avoid some timeouts Bug: 1462683 Change-Id: Ic237cd58f88ae493818fd126795023ba3168e904 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5089347 Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1233541}
- Loading branch information
1 parent
c0fdc02
commit fbcb310
Showing
3 changed files
with
59 additions
and
23 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
long-animation-frame/tentative/loaf-iframe-crossorigin.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE HTML> | ||
<meta charset=utf-8> | ||
<title>Long Animation Frame Timing: iframes (cross-origin)</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(); | ||
|
||
for (const type of ["REMOTE_ORIGIN", "HTTP_NOTSAMESITE_ORIGIN"]) { | ||
promise_test(async t => { | ||
const [executor] = await prepare_exec_iframe(t, host_info[type]); | ||
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 ${type} iframe is not a long animation frame`); | ||
} | ||
|
||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE HTML> | ||
<meta charset=utf-8> | ||
<title>Long Animation Frame Timing: iframes (self)</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(); | ||
|
||
for (const origin of ["ORIGIN", "REMOTE_ORIGIN", "HTTP_NOTSAMESITE_ORIGIN"]) { | ||
promise_test(async t => { | ||
const [executor] = await prepare_exec_iframe(t, host_info[origin]); | ||
const entry = await executor.execute_script(async (duration) => { | ||
const entryPromise = new Promise(resolve => new PerformanceObserver(list => { | ||
resolve(list.getEntries(0)); | ||
}).observe({entryTypes: ["long-animation-frame"]})); | ||
const deadline = performance.now() + duration; | ||
while (performance.now() < deadline) {} | ||
return entryPromise; | ||
}, [very_long_frame_duration]); | ||
}, `frames receive own long animation frames (${origin})`); | ||
} | ||
|
||
</script> | ||
</body> |