Commit bf10dc22 authored by alokp@chromium.org's avatar alokp@chromium.org

Created a separate test page for gpu rasterization.

The new test page uses the viewport tag which makes it easy to sample
pixels from the screenshot. Adding the viewport tag to pixel_css3d page
which is also used for pixel tests because it starts to fail due to
unknown reasons on random bots.

BUG=368495

Review URL: https://codereview.chromium.org/302003015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274469 0039d316-1c4b-4281-b951-d872f2087c98
parent 63baaa98
<html>
<head>
<meta name="viewport" content="initial-scale=1">
<title>Basic Rasterization Test: Blue Box over Black Background</title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
background-color: white;
}
#container {
position: relative;
margin: 10px;
width: 200px;
height: 200px;
background-color: black;
}
#blue_box {
position: relative;
top: 50px;
left: 50px;
width: 100px;
height: 100px;
background-color: blue;
}
</style>
<script>
var g_swapsBeforeAck = 15;
function main() {
waitForFinish();
}
function waitForFinish()
{
if (g_swapsBeforeAck == 0) {
domAutomationController.setAutomationId(1);
domAutomationController.send("SUCCESS");
} else {
g_swapsBeforeAck--;
document.getElementById('blue_box').style.zIndex = g_swapsBeforeAck + 1;
window.webkitRequestAnimationFrame(waitForFinish);
}
}
</script>
</head>
<body onload="main()">
<div id="container">
<div id="blue_box"></div>
</div>
</body>
</html>
...@@ -11,11 +11,10 @@ class GpuRasterizationTestsPage(page_module.Page): ...@@ -11,11 +11,10 @@ class GpuRasterizationTestsPage(page_module.Page):
def __init__(self, page_set): def __init__(self, page_set):
super(GpuRasterizationTestsPage, self).__init__( super(GpuRasterizationTestsPage, self).__init__(
url='file://../../data/gpu/pixel_css3d.html', url='file://../../data/gpu/pixel_background.html',
page_set=page_set, page_set=page_set,
name='GpuRasterization.CSS3DBlueBox') name='GpuRasterization.BlueBox')
self.user_agent_type = 'desktop'
self.expectations = [ self.expectations = [
{'comment': 'body-t', {'comment': 'body-t',
'color': [255, 255, 255], 'color': [255, 255, 255],
...@@ -24,15 +23,15 @@ class GpuRasterizationTestsPage(page_module.Page): ...@@ -24,15 +23,15 @@ class GpuRasterizationTestsPage(page_module.Page):
{'comment': 'body-r', {'comment': 'body-r',
'color': [255, 255, 255], 'color': [255, 255, 255],
'tolerance': 0, 'tolerance': 0,
'location': [245, 5]}, 'location': [215, 5]},
{'comment': 'body-b', {'comment': 'body-b',
'color': [255, 255, 255], 'color': [255, 255, 255],
'tolerance': 0, 'tolerance': 0,
'location': [245, 245]}, 'location': [215, 215]},
{'comment': 'body-l', {'comment': 'body-l',
'color': [255, 255, 255], 'color': [255, 255, 255],
'tolerance': 0, 'tolerance': 0,
'location': [5, 245]}, 'location': [5, 215]},
{'comment': 'background-t', {'comment': 'background-t',
'color': [0, 0, 0], 'color': [0, 0, 0],
'tolerance': 0, 'tolerance': 0,
...@@ -60,13 +59,13 @@ class GpuRasterizationTestsPage(page_module.Page): ...@@ -60,13 +59,13 @@ class GpuRasterizationTestsPage(page_module.Page):
{'comment': 'box-b', {'comment': 'box-b',
'color': [0, 0, 255], 'color': [0, 0, 255],
'tolerance': 0, 'tolerance': 0,
'location': [140, 120]}, 'location': [140, 140]},
{'comment': 'box-l', {'comment': 'box-l',
'color': [0, 0, 255], 'color': [0, 0, 255],
'tolerance': 0, 'tolerance': 0,
'location': [70, 120]} 'location': [70, 140]}
] ]
self.test_rect = [0, 0, 250, 250] self.test_rect = [0, 0, 220, 220]
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self) action_runner.NavigateToPage(self)
...@@ -82,7 +81,6 @@ class GpuRasterizationTestsPageSet(page_set_module.PageSet): ...@@ -82,7 +81,6 @@ class GpuRasterizationTestsPageSet(page_set_module.PageSet):
""" Basic test cases for GPU rasterization. """ """ Basic test cases for GPU rasterization. """
def __init__(self): def __init__(self):
super(GpuRasterizationTestsPageSet, self).__init__( super(GpuRasterizationTestsPageSet, self).__init__()
user_agent_type='desktop')
self.AddPage(GpuRasterizationTestsPage(self)) self.AddPage(GpuRasterizationTestsPage(self))
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