Fix two compositing animation tests to not have flakey pixel results

https://bugs.webkit.org/show_bug.cgi?id=83957

Reviewed by Dean Jackson.

Fix these tests to use the pause animation API by providing an animation
name in the expected data. There's no need to start the animations by hand.

* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
* platform/mac/compositing/reflections/nested-reflection-animated-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent da077a6c
2012-04-13 Simon Fraser <simon.fraser@apple.com>
Fix two compositing animation tests to not have flakey pixel results
https://bugs.webkit.org/show_bug.cgi?id=83957
Reviewed by Dean Jackson.
Fix these tests to use the pause animation API by providing an animation
name in the expected data. There's no need to start the animations by hand.
* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* platform/mac/compositing/reflections/animation-inside-reflection-expected.png:
* platform/mac/compositing/reflections/nested-reflection-animated-expected.png:
2012-04-13 Anders Carlsson <andersca@apple.com>
Rebaseline this since svg/custom/resources/green-checker.png changed.
......@@ -50,22 +50,19 @@
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
[null, 0.5, "animated", "webkitTransform.0", 0.76, 0.1],
["swing", 0.5, "animated", "webkitTransform.0", 0.76, 0.1],
];
function startAnimation()
{
document.getElementById('animated').className = 'animated';
}
runAnimationTest(expectedValues, startAnimation, 'load', false, true /* pixel test */);
var pixelTest = true;
var disablePauseAPI = false;
runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
</script>
</head>
<body>
<p>The top left box, and all reflections should be rotated 45deg.</p>
<div class="outer">
<div id="inner" class="inner">
<div id="animated"></div>
<div id="animated" class="animated"></div>
</div>
</div>
<div id="result"></div>
......
......@@ -42,21 +42,18 @@
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
[null, 0.5, "inner", "webkitTransform.0", 0.76, 0.1],
["swing", 0.5, "inner", "webkitTransform.0", 0.76, 0.1],
];
function startAnimation()
{
document.getElementById('inner').className = 'inner composited animated';
}
runAnimationTest(expectedValues, startAnimation, 'load', false, true /* pixel test */);
var pixelTest = true;
var disablePauseAPI = false;
runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
</script>
</head>
<body>
<p>Animation on original and reflection should both be paused half way through, giving 45deg rotation.</p>
<div class="outer composited">
<div id="inner" class="inner composited">
<div id="inner" class="inner composited animated">
1
</div>
</div>
......
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