Bug 1622453 [wpt PR 22251] - Add 'reftest-wait' class with timeout to reference pages for certain wpt, a=testonly

Automatic update from web-platform-tests
Add 'reftest-wait' class with timeout to reference pages for certain wpt

The reference pages for the 'embedded_style_media_queries*' tests
previously didn't wait to take a screenshot (as opposed to their
counterparts which wait 100ms to take a screenshot), causing them to be
a bit flaky. This CL fixes that.

Change-Id: Ie8dd12b3b4dd7f810d72b3ba94ae2e5cb3644fe0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103142
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#750509}

--

wpt-commits: 5f0d13915e4f46c7d25958f1a59155c200421a15
wpt-pr: 22251
This commit is contained in:
Will Cassella 2020-03-16 14:17:22 +00:00 committed by moz-wptsync-bot
parent be5d325189
commit bc86c1e82a
2 changed files with 28 additions and 0 deletions

View File

@ -1,4 +1,18 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Embedded Style: Media Queries</title>
<script src="/common/reftest-wait.js"></script>
<style>iframe {width:100%; height:500px}</style>
<script>
onload = function() {
let iframeWindow = document.querySelector('iframe').contentWindow;
iframeWindow.requestAnimationFrame(() => {
iframeWindow.requestAnimationFrame(() => {
setTimeout(function() {
takeScreenshot();
}, 100);
});
});
};
</script>
<iframe src="support/embedded_style_media_queries-iframe-ref.html"></iframe>

View File

@ -1,4 +1,18 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Embedded Style: Media Queries Resize Frame</title>
<script src="/common/reftest-wait.js"></script>
<style>iframe {width:100%; height:300px}</style>
<script>
onload = function() {
let iframeWindow = document.querySelector('iframe').contentWindow;
iframeWindow.requestAnimationFrame(() => {
iframeWindow.requestAnimationFrame(() => {
setTimeout(function() {
takeScreenshot();
}, 100);
});
});
};
</script>
<iframe src="support/embedded_style_media_queries_resized-iframe-ref.html"></iframe>