Bug 1518999 - Trick contentful detection in some geckoview tests r=snorp,geckoview-reviewers,agi

Some geckoview tests require gradient usage. Since background
images are async, these tests would wait for a contentful paint
to make sure the images are decoded before running the assertions.
This causes an issue because gradient-only backgrounds aren't
contentful anymore according to the latest spec.

We fix the tests by adding a transparent gif to the background
image list to trick the contentful detection.

Differential Revision: https://phabricator.services.mozilla.com/D88230
This commit is contained in:
Sean Feng 2020-10-23 19:46:30 +00:00
Родитель 2fec5e093a
Коммит bf81634ec8
4 изменённых файлов: 21 добавлений и 3 удалений

Просмотреть файл

@ -3,6 +3,12 @@
<meta charset="utf-8">
<title>Colours</title>
</head>
<body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: linear-gradient(135deg, red, white);">
<!-- background contains one extra transparent.gif because we want trick the
contentful paint detection; We want to make sure the background is loaded
before the test starts so we always wait for the contentful paint timestamp
to exist, however, gradient isn't considered as contentful per spec, so Gecko
wouldn't generate a timestamp for it. Hence, we added a transparent gif
to the image list to trick the detection. !-->
<body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white);">
</body>
</html>

Просмотреть файл

@ -4,7 +4,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fixed bottom element</title>
</head>
<body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: linear-gradient(135deg, blue, blue);">
<!-- background contains one extra transparent.gif because we want trick the
contentful paint detection; We want to make sure the background is loaded
before the test starts so we always wait for the contentful paint timestamp
to exist, however, gradient isn't considered as contentful per spec, so Gecko
wouldn't generate a timestamp for it. Hence, we added a transparent gif
to the image list to trick the detection. !-->
<body style="overflow:hidden; height:100%; width:100%; margin: 0px; padding: 0px; background: url('/assets/www/transparent.gif'), linear-gradient(135deg, blue, blue);">
<div id="bottom-banner" style="width:100%;position:fixed;bottom:0;left:0;background-color:lime;height:10%;"></div>
</body>
</html>

Просмотреть файл

@ -5,7 +5,13 @@
<style type="text/css">
body {
margin: 0;
background: linear-gradient(135deg, red, white);
/* background contains one extra transparent.gif because we want trick the
contentful paint detection; We want to make sure the background is loaded
before the test starts so we always wait for the contentful paint timestamp
to exist, however, gradient isn't considered as contentful per spec, so Gecko
wouldn't generate a timestamp for it. Hence, we added a transparent gif
to the image list to trick the detection. */
background: url('/assets/www/transparent.gif'), linear-gradient(135deg, red, white);
}
#one {

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 43 B