Commit 49e542d2 authored by vikassoni's avatar vikassoni Committed by Commit Bot

Update pixel video test to use correct dimensions.

1. Update 2 pixel video tests to use dimensions within the actual
physical device limits. These tests were using the video player and
test rectangle width which was overflowing the actual physical device
width. Hence we were getting assert when taking a screenshot of the
video and cropping it with the test rectangle because the test rectangle
width was more than the screenshot width.

2. Update the color expectations for 4 tests accordingly.

3. Add viewport metadata for this page to scale correctly on mobile
devices.

4.This CL fixes 2 tests on android - Pixel_Video_MP4_FourColors_Rot_90
and Pixel_Video_MP4_FourColors_Rot_270. Remove the test expectations
from pixel_expectations.txt.

5. This CL updates 2 tests running on windows -
Pixel_DirectComposition_Video_MP4_FourColors_Rot_90
and Pixel_DirectComposition_Video_MP4_FourColors_Rot_270.

Bug: 925744
Change-Id: I3d15256675b538b6be5a4c8f5318c1949c0ab271
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699145
Commit-Queue: vikas soni <vikassoni@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Reviewed-by: default avatarMaggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678550}
parent c484f2f5
...@@ -8,6 +8,7 @@ that the baseline images are regenerated on the next run. ...@@ -8,6 +8,7 @@ that the baseline images are regenerated on the next run.
<html> <html>
<head> <head>
<meta name="viewport" content="initial-scale=1">
<title>MP4 Video with 270 Degree Rotation Test</title> <title>MP4 Video with 270 Degree Rotation Test</title>
<style type="text/css"> <style type="text/css">
.nomargin { .nomargin {
...@@ -18,7 +19,7 @@ that the baseline images are regenerated on the next run. ...@@ -18,7 +19,7 @@ that the baseline images are regenerated on the next run.
</head> </head>
<body onload="main()"> <body onload="main()">
<div id="container" style="position:absolute; top:0px; left:0px"> <div id="container" style="position:absolute; top:0px; left:0px">
<video class="nomargin" id="video" width="427" height="240"> <video class="nomargin" id="video" width="270" height="240">
<source src="/media/test/data/four-colors-rot-270.mp4" type="video/mp4"> <source src="/media/test/data/four-colors-rot-270.mp4" type="video/mp4">
</video> </video>
</div> </div>
......
...@@ -8,6 +8,7 @@ that the baseline images are regenerated on the next run. ...@@ -8,6 +8,7 @@ that the baseline images are regenerated on the next run.
<html> <html>
<head> <head>
<meta name="viewport" content="initial-scale=1">
<title>MP4 Video with 90 Degree Rotation Test</title> <title>MP4 Video with 90 Degree Rotation Test</title>
<style type="text/css"> <style type="text/css">
.nomargin { .nomargin {
...@@ -18,7 +19,7 @@ that the baseline images are regenerated on the next run. ...@@ -18,7 +19,7 @@ that the baseline images are regenerated on the next run.
</head> </head>
<body onload="main()"> <body onload="main()">
<div id="container" style="position:absolute; top:0px; left:0px"> <div id="container" style="position:absolute; top:0px; left:0px">
<video class="nomargin" id="video" width="427" height="240"> <video class="nomargin" id="video" width="270" height="240">
<source src="/media/test/data/four-colors-rot-90.mp4" type="video/mp4"> <source src="/media/test/data/four-colors-rot-90.mp4" type="video/mp4">
</video> </video>
</div> </div>
......
...@@ -304,43 +304,43 @@ class PixelTestPages(object): ...@@ -304,43 +304,43 @@ class PixelTestPages(object):
PixelTestPage( PixelTestPage(
'pixel_video_mp4_four_colors_rot_90.html', 'pixel_video_mp4_four_colors_rot_90.html',
base_name + '_Video_MP4_FourColors_Rot_90', base_name + '_Video_MP4_FourColors_Rot_90',
test_rect=[0, 0, 427, 240], test_rect=[0, 0, 270, 240],
revision=0, # Golden image revision is not used revision=0, # Golden image revision is not used
tolerance=tolerance, tolerance=tolerance,
expected_colors=[ expected_colors=[
{ {
'comment': 'outside video content, left side, white', 'comment': 'outside video content, left side, white',
'location': [1, 1], 'location': [1, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'outside video content, right side, white', 'comment': 'outside video content, right side, white',
'location': [282, 1], 'location': [210, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'top left video, red', 'comment': 'top left video, red',
'location': [152, 5], 'location': [73, 5],
'size': [55, 110], 'size': [55, 110],
'color': [255, 17, 24], 'color': [255, 17, 24],
}, },
{ {
'comment': 'top right video, green', 'comment': 'top right video, green',
'location': [220, 5], 'location': [141, 5],
'size': [55, 110], 'size': [55, 110],
'color': [44, 255, 16], 'color': [44, 255, 16],
}, },
{ {
'comment': 'bottom left video, yellow', 'comment': 'bottom left video, yellow',
'location': [152, 125], 'location': [73, 125],
'size': [55, 110], 'size': [55, 110],
'color': [255, 255, 15], 'color': [255, 255, 15],
}, },
{ {
'comment': 'bottom right video, blue', 'comment': 'bottom right video, blue',
'location': [220, 125], 'location': [141, 125],
'size': [55, 110], 'size': [55, 110],
'color': [12, 12, 255], 'color': [12, 12, 255],
} }
...@@ -382,43 +382,43 @@ class PixelTestPages(object): ...@@ -382,43 +382,43 @@ class PixelTestPages(object):
PixelTestPage( PixelTestPage(
'pixel_video_mp4_four_colors_rot_270.html', 'pixel_video_mp4_four_colors_rot_270.html',
base_name + '_Video_MP4_FourColors_Rot_270', base_name + '_Video_MP4_FourColors_Rot_270',
test_rect=[0, 0, 427, 240], test_rect=[0, 0, 270, 240],
revision=0, # Golden image revision is not used revision=0, # Golden image revision is not used
tolerance=tolerance, tolerance=tolerance,
expected_colors=[ expected_colors=[
{ {
'comment': 'outside video content, left side, white', 'comment': 'outside video content, left side, white',
'location': [1, 1], 'location': [1, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'outside video content, right side, white', 'comment': 'outside video content, right side, white',
'location': [282, 1], 'location': [210, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'top left video, blue', 'comment': 'top left video, blue',
'location': [152, 5], 'location': [73, 5],
'size': [55, 110], 'size': [55, 110],
'color': [12, 12, 255], 'color': [12, 12, 255],
}, },
{ {
'comment': 'top right video, yellow', 'comment': 'top right video, yellow',
'location': [220, 5], 'location': [141, 5],
'size': [55, 110], 'size': [55, 110],
'color': [255, 255, 15], 'color': [255, 255, 15],
}, },
{ {
'comment': 'bottom left video, green', 'comment': 'bottom left video, green',
'location': [152, 125], 'location': [73, 125],
'size': [55, 110], 'size': [55, 110],
'color': [44, 255, 16], 'color': [44, 255, 16],
}, },
{ {
'comment': 'bottom right video, red', 'comment': 'bottom right video, red',
'location': [220, 125], 'location': [141, 125],
'size': [55, 110], 'size': [55, 110],
'color': [255, 17, 24], 'color': [255, 17, 24],
} }
...@@ -1186,7 +1186,7 @@ class PixelTestPages(object): ...@@ -1186,7 +1186,7 @@ class PixelTestPages(object):
PixelTestPage( PixelTestPage(
'pixel_video_mp4_four_colors_rot_90.html', 'pixel_video_mp4_four_colors_rot_90.html',
base_name + '_DirectComposition_Video_MP4_FourColors_Rot_90', base_name + '_DirectComposition_Video_MP4_FourColors_Rot_90',
test_rect=[0, 0, 427, 240], test_rect=[0, 0, 270, 240],
revision=0, # Golden image revision is not used revision=0, # Golden image revision is not used
browser_args=browser_args, browser_args=browser_args,
other_args={'video_is_rotated': True}, other_args={'video_is_rotated': True},
...@@ -1195,36 +1195,36 @@ class PixelTestPages(object): ...@@ -1195,36 +1195,36 @@ class PixelTestPages(object):
{ {
'comment': 'outside video content, left side, white', 'comment': 'outside video content, left side, white',
'location': [1, 1], 'location': [1, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'outside video content, right side, white', 'comment': 'outside video content, right side, white',
'location': [282, 1], 'location': [210, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'top left video, red', 'comment': 'top left video, red',
'location': [152, 5], 'location': [73, 5],
'size': [55, 110], 'size': [55, 110],
'color': [255, 17, 24], 'color': [255, 17, 24],
}, },
{ {
'comment': 'top right video, green', 'comment': 'top right video, green',
'location': [220, 5], 'location': [141, 5],
'size': [55, 110], 'size': [55, 110],
'color': [44, 255, 16], 'color': [44, 255, 16],
}, },
{ {
'comment': 'bottom left video, yellow', 'comment': 'bottom left video, yellow',
'location': [152, 125], 'location': [73, 125],
'size': [55, 110], 'size': [55, 110],
'color': [255, 255, 15], 'color': [255, 255, 15],
}, },
{ {
'comment': 'bottom right video, blue', 'comment': 'bottom right video, blue',
'location': [220, 125], 'location': [141, 125],
'size': [55, 110], 'size': [55, 110],
'color': [12, 12, 255], 'color': [12, 12, 255],
}]), }]),
...@@ -1266,7 +1266,7 @@ class PixelTestPages(object): ...@@ -1266,7 +1266,7 @@ class PixelTestPages(object):
PixelTestPage( PixelTestPage(
'pixel_video_mp4_four_colors_rot_270.html', 'pixel_video_mp4_four_colors_rot_270.html',
base_name + '_DirectComposition_Video_MP4_FourColors_Rot_270', base_name + '_DirectComposition_Video_MP4_FourColors_Rot_270',
test_rect=[0, 0, 427, 240], test_rect=[0, 0, 270, 240],
revision=0, # Golden image revision is not used revision=0, # Golden image revision is not used
browser_args=browser_args, browser_args=browser_args,
other_args={'video_is_rotated': True}, other_args={'video_is_rotated': True},
...@@ -1275,36 +1275,36 @@ class PixelTestPages(object): ...@@ -1275,36 +1275,36 @@ class PixelTestPages(object):
{ {
'comment': 'outside video content, left side, white', 'comment': 'outside video content, left side, white',
'location': [1, 1], 'location': [1, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'outside video content, right side, white', 'comment': 'outside video content, right side, white',
'location': [282, 1], 'location': [210, 1],
'size': [144, 238], 'size': [60, 238],
'color': [255, 255, 255], 'color': [255, 255, 255],
}, },
{ {
'comment': 'top left video, blue', 'comment': 'top left video, blue',
'location': [152, 5], 'location': [73, 5],
'size': [55, 110], 'size': [55, 110],
'color': [12, 12, 255], 'color': [12, 12, 255],
}, },
{ {
'comment': 'top right video, yellow', 'comment': 'top right video, yellow',
'location': [220, 5], 'location': [141, 5],
'size': [55, 110], 'size': [55, 110],
'color': [255, 255, 15], 'color': [255, 255, 15],
}, },
{ {
'comment': 'bottom left video, green', 'comment': 'bottom left video, green',
'location': [152, 125], 'location': [73, 125],
'size': [55, 110], 'size': [55, 110],
'color': [44, 255, 16], 'color': [44, 255, 16],
}, },
{ {
'comment': 'bottom right video, red', 'comment': 'bottom right video, red',
'location': [220, 125], 'location': [141, 125],
'size': [55, 110], 'size': [55, 110],
'color': [255, 17, 24], 'color': [255, 17, 24],
}]), }]),
......
...@@ -146,10 +146,6 @@ crbug.com/911413 [ mac amd-0x679e ] Pixel_Video_MP4_FourColors_Rot_270 [ Skip ] ...@@ -146,10 +146,6 @@ crbug.com/911413 [ mac amd-0x679e ] Pixel_Video_MP4_FourColors_Rot_270 [ Skip ]
# Fails on multiple Android devices. # Fails on multiple Android devices.
crbug.com/927107 [ android no-skia-renderer ] Pixel_CSS3DBlueBox [ Failure ] crbug.com/927107 [ android no-skia-renderer ] Pixel_CSS3DBlueBox [ Failure ]
# Fail on Nexus 5, 5X, 6, 6P, 9 and Shield TV.
crbug.com/925744 [ android ] Pixel_Video_MP4_FourColors_Rot_270 [ Skip ]
crbug.com/925744 [ android ] Pixel_Video_MP4_FourColors_Rot_90 [ Skip ]
# Skip on platforms where DXVA vs D3D11 decoder doesn't matter. # Skip on platforms where DXVA vs D3D11 decoder doesn't matter.
crbug.com/927901 [ linux ] Pixel_Video_MP4_DXVA [ Skip ] crbug.com/927901 [ linux ] Pixel_Video_MP4_DXVA [ Skip ]
crbug.com/927901 [ android ] Pixel_Video_MP4_DXVA [ Skip ] crbug.com/927901 [ android ] Pixel_Video_MP4_DXVA [ Skip ]
......
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