Diff
Modified: trunk/LayoutTests/ChangeLog (105218 => 105219)
--- trunk/LayoutTests/ChangeLog 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/ChangeLog 2012-01-18 01:18:20 UTC (rev 105219)
@@ -1,3 +1,42 @@
+2012-01-17 Simon Fraser <[email protected]>
+
+ Reduce the number of compositing test failures
+ https://bugs.webkit.org/show_bug.cgi?id=76495
+
+ Reviewed by James Robinson.
+
+ General cleanup of compositing tests:
+ * video tests now do a seek to guarantee that the pixel result will show a frame
+ * video tests use a shared JS file (can't use media/video-test.js because it always
+ calls dumpAsText(), which is not reversible).
+ * ideo-with-invalid-source.html fixed to use a file extension so that the
+ error event fires (bug 76494).
+ * pixel results rebaselined.
+
+ * compositing/geometry/clipped-video-controller.html:
+ * compositing/geometry/video-fixed-scrolling.html:
+ * compositing/geometry/video-opacity-overlay.html:
+ * compositing/layers-inside-overflow-scroll.html:
+ * compositing/overflow/scroll-ancestor-update.html:
+ * compositing/reflections/load-video-in-reflection.html:
+ * compositing/resources/media-testing.js: Added.
+ (ensureFrameVisible):
+ * compositing/self-painting-layers.html:
+ * compositing/video/video-with-invalid-source.html:
+ * compositing/visibility/visibility-simple-video-layer.html:
+ * platform/mac/compositing/color-matching/image-color-matching-expected.png:
+ * platform/mac/compositing/geometry/video-fixed-scrolling-expected.png:
+ * platform/mac/compositing/geometry/video-opacity-overlay-expected.png:
+ * platform/mac/compositing/layers-inside-overflow-scroll-expected.png:
+ * platform/mac/compositing/overflow/scroll-ancestor-update-expected.png:
+ * platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt:
+ * platform/mac/compositing/plugins/composited-plugin-expected.png:
+ * platform/mac/compositing/reflections/load-video-in-reflection-expected.png:
+ * platform/mac/compositing/reflections/simple-composited-reflections-expected.png:
+ * platform/mac/compositing/self-painting-layers-expected.png:
+ * platform/mac/compositing/video/video-background-color-expected.png:
+ * platform/mac/test_expectations.txt:
+
2012-01-17 Caio Marcelo de Oliveira Filho <[email protected]>
Uint8ClampedArray support
Modified: trunk/LayoutTests/compositing/geometry/clipped-video-controller.html (105218 => 105219)
--- trunk/LayoutTests/compositing/geometry/clipped-video-controller.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/geometry/clipped-video-controller.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -1,10 +1,7 @@
<!DOCTYPE html>
-<html lang="en">
+<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Clipped Video</title>
-</head>
<style>
#box {
@@ -18,25 +15,30 @@
}
</style>
+ <script src=""
+ <script src=""
+
<script type="text/_javascript_" charset="utf-8">
- if (window.layoutTestController) {
- layoutTestController.dumpAsText(true);
- layoutTestController.waitUntilDone();
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
}
+
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, '../resources/video', null, testDone);
+ }
</script>
-
-<body>
+</head>
+<body _onload_="doTest()">
<p>The video controller should not be visible below</p>
<div id="box">
<video controls></video>
</div>
- <script type="text/_javascript_" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
Modified: trunk/LayoutTests/compositing/geometry/video-fixed-scrolling.html (105218 => 105219)
--- trunk/LayoutTests/compositing/geometry/video-fixed-scrolling.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/geometry/video-fixed-scrolling.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -24,25 +24,31 @@
background-color: rgba(0, 0, 255, 0.8);
}
</style>
+ <script src=""
+ <script src=""
<script type="text/_javascript_" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function modifyDocument()
+ {
+ window.scrollBy(50, 50);
+ }
+
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, '../resources/video', modifyDocument, testDone);
+ }
</script>
</head>
-<body>
+<body _onload_="doTest()">
<video></video>
<p>The blue bar should be in front of the video, and at the top of the page.</p>
<div id="fixed-bar"></div>
-
- <script type="text/_javascript_" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- window.scrollBy(50, 50);
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
Modified: trunk/LayoutTests/compositing/geometry/video-opacity-overlay.html (105218 => 105219)
--- trunk/LayoutTests/compositing/geometry/video-opacity-overlay.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/geometry/video-opacity-overlay.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -1,10 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE html>
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Video overlay</title>
- <style type="text/css" media="screen">
+ <style>
video {
width: 100%;
height: 100%;
@@ -33,12 +30,23 @@
background-color: orange;
}
</style>
+ <script src=""
+ <script src=""
<script type="text/_javascript_" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, '../resources/video', null, testDone);
+ }
</script>
</head>
-<body>
+<body _onload_="doTest()">
<p>The orange bar should be in front of the video.</p>
<div class="container">
<video></video>
@@ -46,13 +54,6 @@
<div id="control-bar"></div>
</div>
</div>
- <script type="text/_javascript_" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
+
</body>
</html>
Modified: trunk/LayoutTests/compositing/layers-inside-overflow-scroll.html (105218 => 105219)
--- trunk/LayoutTests/compositing/layers-inside-overflow-scroll.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/layers-inside-overflow-scroll.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -33,30 +33,32 @@
-webkit-transform: translateZ(0);
}
</style>
+ <script src=""
+ <script src=""
+
<script type="text/_javascript_" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
- function testOnLoad()
+ function testDone()
{
- window.setTimeout(function() {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function modifyDocument()
+ {
document.getElementById('details').scrollTop = 100;
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, 0);
}
- window.addEventListener('load', function() {
- var video = document.getElementById('video');
- video.addEventListener('loadeddata', testOnLoad, false);
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- }, false);
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, 'resources/video', modifyDocument, testDone);
+ }
</script>
</head>
- <body>
+ <body _onload_="doTest()">
<p>The red box in the overflow:scroll div should be scrolled out of view.</p>
<div id="container">
- <video id="video" width="300" height="200"></video>
+ <video width="300" height="200"></video>
</div>
<div id="details">
Modified: trunk/LayoutTests/compositing/overflow/scroll-ancestor-update.html (105218 => 105219)
--- trunk/LayoutTests/compositing/overflow/scroll-ancestor-update.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/overflow/scroll-ancestor-update.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -50,18 +50,29 @@
background-color: red;
}
</style>
+
+ <script src=""
+ <script src=""
<script type="text/_javascript_" charset="utf-8">
+ function testDone()
+ {
if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
- function scrollTestDiv()
- {
- var scroller = document.getElementById('scroller');
- scroller.scrollTop = 50;
- }
+ layoutTestController.notifyDone();
+ }
+
+ function modifyDocument()
+ {
+ document.getElementById('scroller').scrollTop = 50;
+ }
+
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, '../resources/video', modifyDocument, testDone);
+ }
</script>
</head>
-<body>
+<body _onload_="doTest()">
<div class="indicator box"></div>
@@ -76,14 +87,5 @@
<video></video>
- <script type="text/_javascript_" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- scrollTestDiv();
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
Modified: trunk/LayoutTests/compositing/reflections/load-video-in-reflection.html (105218 => 105219)
--- trunk/LayoutTests/compositing/reflections/load-video-in-reflection.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/reflections/load-video-in-reflection.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -20,31 +20,23 @@
}
</style>
+ <script src=""
+ <script src=""
<script type="text/_javascript_" charset="utf-8">
-
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
- function videoLoaded()
+ function testDone()
{
if (window.layoutTestController)
layoutTestController.notifyDone();
}
- function runTest()
+ function doTest()
{
var video = document.getElementsByTagName('video')[0];
- video.addEventListener('canplaythrough', videoLoaded, false);
-
- window.setTimeout(function() {
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- }, 100);
+ setupVideo(video, '../resources/video', null, testDone);
}
-
- window.addEventListener('load', runTest, false)
</script>
</head>
-<body>
+<body _onload_="doTest()">
<p>You should see a reflected video below, rather than the red video background.</p>
<div class="container">
<video></video>
Added: trunk/LayoutTests/compositing/resources/media-testing.js (0 => 105219)
--- trunk/LayoutTests/compositing/resources/media-testing.js (rev 0)
+++ trunk/LayoutTests/compositing/resources/media-testing.js 2012-01-18 01:18:20 UTC (rev 105219)
@@ -0,0 +1,20 @@
+
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function ensureFrameVisible(video, videoRenderedCallbac)
+{
+ video.addEventListener('seeked', videoRenderedCallbac, false);
+ video.currentTime = 0.5;
+}
+
+function setupVideo(videoElement, videoPath, canPlayThroughCallback, videoRenderedCallbac)
+{
+ var mediaFile = findMediaFile("video", videoPath);
+ videoElement.addEventListener("canplaythrough", function () {
+ if (canPlayThroughCallback)
+ canPlayThroughCallback();
+ ensureFrameVisible(this, videoRenderedCallbac);
+ }, false);
+ videoElement.src = ""
+}
Modified: trunk/LayoutTests/compositing/self-painting-layers.html (105218 => 105219)
--- trunk/LayoutTests/compositing/self-painting-layers.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/self-painting-layers.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -25,29 +25,31 @@
font-size: 24pt;
line-height: 150%;
}
-
</style>
+
+ <script src=""
+ <script src=""
+
<script type="text/_javascript_" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
- function testOnLoad()
+ function modifyDocument()
{
- window.setTimeout(function() {
- document.getElementById('details').scrollTop = 24;
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, 0);
+ document.getElementById('details').scrollTop = 24;
}
-
- window.addEventListener('load', function() {
- var video = document.getElementById('video');
- video.addEventListener('loadeddata', testOnLoad, false);
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- }, false);
+
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, 'resources/video', modifyDocument, testDone);
+ }
</script>
</head>
- <body>
+ <body _onload_="doTest()">
<p>You should not see double text when the div scrolls</p>
<div id="container">
<video id="video" width="300" height="200"></video>
Modified: trunk/LayoutTests/compositing/video/video-with-invalid-source.html (105218 => 105219)
--- trunk/LayoutTests/compositing/video/video-with-invalid-source.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/video/video-with-invalid-source.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -9,7 +9,7 @@
var v = document.createElement("video");
document.body.appendChild(v);
var src = ""
- src.src = ""
+ src.src = ""
v.appendChild(src);
src.addEventListener("error", function() {
if (window.layoutTestController) {
Modified: trunk/LayoutTests/compositing/visibility/visibility-simple-video-layer.html (105218 => 105219)
--- trunk/LayoutTests/compositing/visibility/visibility-simple-video-layer.html 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/compositing/visibility/visibility-simple-video-layer.html 2012-01-18 01:18:20 UTC (rev 105219)
@@ -28,11 +28,11 @@
}
</style>
- <script>
- if (window.layoutTestController) {
+ <script src=""
+ <script src=""
+ <script type="text/_javascript_" charset="utf-8">
+ if (window.layoutTestController)
layoutTestController.dumpAsText(true);
- layoutTestController.waitUntilDone();
- }
var counter = 0;
function notifyVideoDone() {
@@ -41,26 +41,20 @@
layoutTestController.notifyDone();
}
- function playVideoOnElement(video) {
- video.src = '' + (video.canPlayType('video/ogg') ? 'ogv' : 'mov');
- video.addEventListener('ended', function(event) {
- notifyVideoDone();
- }, false);
+ function doTest()
+ {
+ setupVideo(document.getElementsByTagName('video')[0], '../resources/video', null, notifyVideoDone);
+ setupVideo(document.getElementsByTagName('video')[1], '../resources/video', null, notifyVideoDone);
+ setupVideo(document.getElementsByTagName('video')[2], '../resources/video', null, notifyVideoDone);
}
-
- function init() {
- playVideoOnElement(document.getElementsByTagName('video')[0]);
- playVideoOnElement(document.getElementsByTagName('video')[1]);
- playVideoOnElement(document.getElementsByTagName('video')[2]);
- }
</script>
</head>
- <body _onload_="init()">
+ <body _onload_="doTest()">
<!-- Tests CSS visibility flag for composited video layers. -->
<!-- Pixel test only. Only the top video should be visible, the other two should be hidden (borders should remain visible) -->
- <div><video class="visible composited box" autoplay></video></div>
- <div><video class="hidden box" autoplay></video></div>
- <div><video class="hidden composited box" autoplay></video></div>
+ <div><video class="visible composited box"></video></div>
+ <div><video class="hidden box"></video></div>
+ <div><video class="hidden composited box"></video></div>
</body>
</html>
Modified: trunk/LayoutTests/platform/mac/compositing/color-matching/image-color-matching-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/geometry/video-fixed-scrolling-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/geometry/video-opacity-overlay-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/layers-inside-overflow-scroll-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt (105218 => 105219)
--- trunk/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt 2012-01-18 01:18:20 UTC (rev 105219)
@@ -4,7 +4,6 @@
RenderBlock {HTML} at (0,0) size 800x104
RenderBody {BODY} at (0,0) size 800x104
RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,0) size 0x0
layer at (0,0) size 100x100
RenderVideo {VIDEO} at (0,0) size 100x100
layer at (50,50) size 100x100
Modified: trunk/LayoutTests/platform/mac/compositing/plugins/composited-plugin-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/reflections/load-video-in-reflection-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/reflections/simple-composited-reflections-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/self-painting-layers-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/compositing/video/video-background-color-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (105218 => 105219)
--- trunk/LayoutTests/platform/mac/test_expectations.txt 2012-01-18 01:16:30 UTC (rev 105218)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt 2012-01-18 01:18:20 UTC (rev 105219)
@@ -2,6 +2,9 @@
//
// See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
+BUGWK76478 : compositing/iframes/repaint-after-losing-scrollbars.html = IMAGE
+BUGWK76489 : compositing/webgl/webgl-reflection.html = IMAGE
+
// Our slow tests, in alphabetical order.
BUGWK57672 : http/tests/local/fileapi/send-sliced-dragged-file.html = TEXT PASS