[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 14:49:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e0fab3f43f01e4d2a1ce15ed2e67f2d2ef14ba9c
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 21 15:33:53 2010 +0000

    2010-10-21  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            'transparent' should be a valid color
            https://bugs.webkit.org/show_bug.cgi?id=45482
    
            Reworked testcase to use SVG animation testing framework.
    
            * svg/animations/animate-color-transparent-expected.txt: Added.
            * svg/animations/animate-color-transparent.html: Added.
            * svg/animations/script-tests/animate-color-transparent.js: Added.
            * svg/animations/svg-animate-color-transparent-expected.txt: Removed.
            * svg/animations/svg-animate-color-transparent.svg: Removed.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70236 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index deb442d..2e58d6c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-21  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        'transparent' should be a valid color
+        https://bugs.webkit.org/show_bug.cgi?id=45482
+
+        Reworked testcase to use SVG animation testing framework.
+
+        * svg/animations/animate-color-transparent-expected.txt: Added.
+        * svg/animations/animate-color-transparent.html: Added.
+        * svg/animations/script-tests/animate-color-transparent.js: Added.
+        * svg/animations/svg-animate-color-transparent-expected.txt: Removed.
+        * svg/animations/svg-animate-color-transparent.svg: Removed.
+
 2010-10-21  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r70225.
diff --git a/LayoutTests/svg/animations/animate-color-transparent-expected.txt b/LayoutTests/svg/animations/animate-color-transparent-expected.txt
new file mode 100644
index 0000000..ad26b4a
--- /dev/null
+++ b/LayoutTests/svg/animations/animate-color-transparent-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic animation tests
+
+Tests that 'transparent' is treated as a valid color.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS rect.style.fill is '#00FF00'
+PASS rect.style.fill is '#7F0000'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/animations/animate-color-transparent.html b/LayoutTests/svg/animations/animate-color-transparent.html
new file mode 100644
index 0000000..e7be1d8
--- /dev/null
+++ b/LayoutTests/svg/animations/animate-color-transparent.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../dynamic-updates/resources/SVGTestCase.js"></script>
+<script src="resources/SVGAnimationTestCase.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic animation tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/animate-color-transparent.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/animations/script-tests/animate-color-transparent.js b/LayoutTests/svg/animations/script-tests/animate-color-transparent.js
new file mode 100644
index 0000000..c554549
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animate-color-transparent.js
@@ -0,0 +1,46 @@
+description("Tests that 'transparent' is treated as a valid color.");
+createSVGTestCase();
+
+// Setup test document
+var rect = createSVGElement("rect");
+rect.setAttribute("id", "test");
+rect.setAttribute("width", "100px");
+rect.setAttribute("height", "100px");
+rect.setAttribute("fill", "#00FF00");
+
+var animate = createSVGElement("animateColor");
+animate.setAttribute("id", "animation");
+animate.setAttribute("attributeName", "fill");
+animate.setAttribute("from", "transparent");
+animate.setAttribute("by", "red");
+animate.setAttribute("dur", "3s");
+animate.setAttribute("begin", "click");
+rect.appendChild(animate);
+rootSVGElement.appendChild(rect);
+
+// Setup animation test
+function expectTransparent() {
+    // Check initial/end conditions
+    shouldBe("rect.style.fill", "'#00FF00'");
+}
+
+function expectOtherColor() {
+    // Check half-time conditions
+    shouldBe("rect.style.fill", "'#7F0000'");
+}
+
+function executeTest() {
+    const expectedValues = [
+        // [animationId, time, elementId, sampleCallback]
+        ["animation", 0.0,    "test", expectTransparent],
+        ["animation", 1.5,    "test", expectOtherColor]
+    ];
+
+    runAnimationTest(expectedValues);
+}
+
+// Begin test async
+rect.setAttribute("onclick", "executeTest()");
+window.setTimeout("triggerUpdate(50, 50)", 0);
+var successfullyParsed = true;
+
diff --git a/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt b/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt
deleted file mode 100644
index 19b859c..0000000
--- a/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Test for https://bugs.webkit.org/show_bug.cgi?id=45482
-The rectangle above should animate and should see PASSED below.
-PASSED
diff --git a/LayoutTests/svg/animations/svg-animate-color-transparent.svg b/LayoutTests/svg/animations/svg-animate-color-transparent.svg
deleted file mode 100644
index 7ee4664..0000000
--- a/LayoutTests/svg/animations/svg-animate-color-transparent.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-    <rect width="100px" height="100px" id="test">
-        <animateColor attributeName="fill"
-             from="transparent" by="red" dur="5s" repeatCount="indefinite" />
-    </rect>
-    <text y="140px">Test for https://bugs.webkit.org/show_bug.cgi?id=45482</text>
-    <text y="160px">The rectangle above should animate and should see PASSED below.</text>
-    <text y="180px" id="console"/>
-    <script><![CDATA[
-        if (window.layoutTestController) {
-            layoutTestController.dumpAsText();
-            layoutTestController.waitUntilDone();
-        }
-
-        function doTest() {
-            var console = document.getElementById("console");
-            // Should not be transparent (initial value) as it would mean that the color is considered invalid.
-            if (document.getElementById("test").style.fill.match(/^#(?!(000000||000)$)/))
-                console.appendChild(document.createTextNode("PASSED"));
-            else
-                console.appendChild(document.createTextNode("FAILED"));
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
-        }
-
-        window.setTimeout(doTest, 100);
-    ]]></script>
-</svg>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list