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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105219
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-17 Simon Fraser <simon.fraser@apple.com>
+
+ 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 <caio.oliveira@openbossa.org>
Uint8ClampedArray support
<!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 {
}
</style>
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
+
<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();
}
- </script>
-<body>
+ function doTest()
+ {
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, '../resources/video', null, testDone);
+ }
+ </script>
+</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 = '../resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
background-color: rgba(0, 0, 255, 0.8);
}
</style>
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
<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 = '../resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- window.scrollBy(50, 50);
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
-<!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%;
background-color: orange;
}
</style>
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
<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>
<div id="control-bar"></div>
</div>
</div>
- <script type="text/javascript" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '../resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
+
</body>
</html>
-webkit-transform: translateZ(0);
}
</style>
- <script type="text/javascript" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
+ <script src="resources/media-testing.js"></script>
+ <script src="../media/media-file.js"></script>
- function testOnLoad()
+ <script type="text/javascript" charset="utf-8">
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function modifyDocument()
{
- window.setTimeout(function() {
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 = 'resources/video.' + (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">
background-color: red;
}
</style>
+
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
<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>
<video></video>
- <script type="text/javascript" charset="utf-8">
- var video = document.getElementsByTagName('video')[0];
- video.src = '../resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- video.addEventListener('canplaythrough', function() {
- scrollTestDiv();
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, false);
- </script>
</body>
</html>
}
</style>
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
<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 = '../resources/video.' + (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>
--- /dev/null
+
+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 = mediaFile;
+}
font-size: 24pt;
line-height: 150%;
}
-
</style>
+
+ <script src="resources/media-testing.js"></script>
+ <script src="../media/media-file.js"></script>
+
<script type="text/javascript" charset="utf-8">
- if (window.layoutTestController)
- layoutTestController.waitUntilDone();
+ function testDone()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function modifyDocument()
+ {
+ document.getElementById('details').scrollTop = 24;
+ }
- function testOnLoad()
+ function doTest()
{
- window.setTimeout(function() {
- document.getElementById('details').scrollTop = 24;
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }, 0);
+ var video = document.getElementsByTagName('video')[0];
+ setupVideo(video, 'resources/video', modifyDocument, testDone);
}
-
- window.addEventListener('load', function() {
- var video = document.getElementById('video');
- video.addEventListener('loadeddata', testOnLoad, false);
- video.src = 'resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mp4');
- }, false);
</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>
var v = document.createElement("video");\r
document.body.appendChild(v);\r
var src = document.createElement("source");\r
- src.src = "notarealsource";\r
+ src.src = "notarealsource.txt";\r
v.appendChild(src);\r
src.addEventListener("error", function() {\r
if (window.layoutTestController) {\r
}
</style>
- <script>
- if (window.layoutTestController) {
+ <script src="../resources/media-testing.js"></script>
+ <script src="../../media/media-file.js"></script>
+ <script type="text/javascript" charset="utf-8">
+ if (window.layoutTestController)
layoutTestController.dumpAsText(true);
- layoutTestController.waitUntilDone();
- }
var counter = 0;
function notifyVideoDone() {
layoutTestController.notifyDone();
}
- function playVideoOnElement(video) {
- video.src = '../resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : 'mov');
- video.addEventListener('ended', function(event) {
- notifyVideoDone();
- }, false);
- }
-
- function init() {
- playVideoOnElement(document.getElementsByTagName('video')[0]);
- playVideoOnElement(document.getElementsByTagName('video')[1]);
- playVideoOnElement(document.getElementsByTagName('video')[2]);
+ 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);
}
</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>
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
//
// 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