Commit 8ec2dcab authored by Vikas Soni's avatar Vikas Soni Committed by Commit Bot

Add a new pixel test pixel_BackgroundImage.

Add a new pixel test which creates and rasterizes multiple tiles. This
test is meant to check if all tiles are drawn correctly without
overwriting each other contents.

Bug: 883500
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I83190b6f887122aaf76cfd74533650e732391cdf
Reviewed-on: https://chromium-review.googlesource.com/1222890Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591440}
parent 7443df41
<!DOCTYPE html>
<html>
<head>
<title>Background Image Test: Repeat single_face background image</title>
<style type="text/css">
.nomargin {
margin: 0px auto;
}
</style>
<script>
var g_swapsBeforeAck = 15;
function main() {
loadAndDecodeImage("single_face.jpg");
}
function loadAndDecodeImage(src) {
var img = new Image ();
img.onload = () => {
// Issue a decode command
img.decode().then( () => {
document.body.style.backgroundImage = 'url('+img.src+')';
document.body.style.backgroundRepeat = "repeat";
waitForFinish();
}).catch( () => {
document.body.appendChild(new Text("Could not load and decode the image :("));
domAutomationController.send("FAILURE");
});
}
img.src = src;
}
function waitForFinish()
{
if (g_swapsBeforeAck == 0) {
domAutomationController.send("SUCCESS");
} else {
g_swapsBeforeAck--;
window.requestAnimationFrame(waitForFinish);
}
}
</script>
</head>
<body onload="main()">
</body>
</html>
......@@ -130,3 +130,6 @@ class PixelExpectations(GpuTestExpectations):
self.Fail('Pixel_CanvasLowLatencyWebGL', ['android', 'nvidia'], bug=868596)
self.Fail('Pixel_OffscreenCanvasWebGLPaintAfterResize',
['android', 'nvidia'], bug=868596)
# TODO(vikassoni): Suppress new test first time to generate reference image.
self.Fail('Pixel_BackgroundImage', bug=883500)
......@@ -92,6 +92,12 @@ SCALE_FACTOR_OVERRIDES = {
def DefaultPages(base_name):
return [
PixelTestPage(
'pixel_background_image.html',
base_name + '_BackgroundImage',
test_rect=[20, 20, 370, 370],
revision=0),
PixelTestPage(
'pixel_canvas2d.html',
base_name + '_Canvas2DRedBox',
......
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