Commit 36d16d14 authored by Will Cassella's avatar Will Cassella Committed by Commit Bot

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: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#750509}
parent 6bfd9932
<!DOCTYPE html> <!DOCTYPE html>
<html class="reftest-wait">
<title>Embedded Style: Media Queries</title> <title>Embedded Style: Media Queries</title>
<script src="/common/reftest-wait.js"></script>
<style>iframe {width:100%; height:500px}</style> <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> <iframe src="support/embedded_style_media_queries-iframe-ref.html"></iframe>
<!DOCTYPE html> <!DOCTYPE html>
<html class="reftest-wait">
<title>Embedded Style: Media Queries Resize Frame</title> <title>Embedded Style: Media Queries Resize Frame</title>
<script src="/common/reftest-wait.js"></script>
<style>iframe {width:100%; height:300px}</style> <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> <iframe src="support/embedded_style_media_queries_resized-iframe-ref.html"></iframe>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment