2011-05-27 Nikolas Zimmermann <nzimmermann@rim.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 May 2011 06:52:04 +0000 (06:52 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 May 2011 06:52:04 +0000 (06:52 +0000)
        Not reviewed, this just adds a new test.

        WebKit fails WICD SVG background image tests
        https://bugs.webkit.org/show_bug.cgi?id=16481

        Add two WICD SVG background image tests, which pass just fine.

        * svg/wicd/resources/test-scalable-background-image1.css: Added.
        (html):
        (body):
        (p):
        * svg/wicd/resources/test-scalable-background-image1.svg: Added.
        * svg/wicd/resources/test-scalable-background-image2.css: Added.
        (html):
        * svg/wicd/resources/test-scalable-background-image2.svg: Added.
        * svg/wicd/test-scalable-background-image1.xhtml: Added.
        * svg/wicd/test-scalable-background-image2.xhtml: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.txt [new file with mode: 0644]
LayoutTests/svg/wicd/resources/test-scalable-background-image1.css [new file with mode: 0644]
LayoutTests/svg/wicd/resources/test-scalable-background-image1.svg [new file with mode: 0644]
LayoutTests/svg/wicd/resources/test-scalable-background-image2.css [new file with mode: 0644]
LayoutTests/svg/wicd/resources/test-scalable-background-image2.svg [new file with mode: 0644]
LayoutTests/svg/wicd/test-scalable-background-image1.xhtml [new file with mode: 0644]
LayoutTests/svg/wicd/test-scalable-background-image2.xhtml [new file with mode: 0644]

index d6aee87..a06f98f 100644 (file)
@@ -1,3 +1,23 @@
+2011-05-27  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Not reviewed, this just adds a new test.
+
+        WebKit fails WICD SVG background image tests
+        https://bugs.webkit.org/show_bug.cgi?id=16481
+
+        Add two WICD SVG background image tests, which pass just fine.
+
+        * svg/wicd/resources/test-scalable-background-image1.css: Added.
+        (html):
+        (body):
+        (p):
+        * svg/wicd/resources/test-scalable-background-image1.svg: Added.
+        * svg/wicd/resources/test-scalable-background-image2.css: Added.
+        (html):
+        * svg/wicd/resources/test-scalable-background-image2.svg: Added.
+        * svg/wicd/test-scalable-background-image1.xhtml: Added.
+        * svg/wicd/test-scalable-background-image2.xhtml: Added.
+
 2011-05-27  Annie Sullivan  <sullivan@chromium.org>
 
         Reviewed by Ryosuke Niwa.
diff --git a/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.png b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.png
new file mode 100644 (file)
index 0000000..5f35dbb
Binary files /dev/null and b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.txt b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.txt
new file mode 100644 (file)
index 0000000..8a5d49e
--- /dev/null
@@ -0,0 +1,25 @@
+layer at (0,0) size 820x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 800x312
+  RenderBlock {html} at (0,0) size 800x312
+    RenderBody {body} at (48,8) size 772x296
+      RenderBlock {h1} at (10,40) size 691x31
+        RenderText {#text} at (0,0) size 315x30
+          text run at (0,0) width 315: "scalable CSS background"
+      RenderBlock {h4} at (10,71) size 752x16
+        RenderText {#text} at (0,0) size 125x16
+          text run at (0,0) width 125: "WICD Core 1.0 #11"
+      RenderBlock {p} at (10,106) size 711x36
+        RenderText {#text} at (10,10) size 494x16
+          text run at (10,10) width 494: "This text paragraph, as well as all following, must have a SVG background image."
+      RenderBlock {p} at (10,147) size 711x36
+        RenderText {#text} at (10,10) size 669x16
+          text run at (10,10) width 669: "This background image (grey color-gradient and rounded corners) must always exactly fit the text paragraph."
+      RenderBlock {p} at (10,188) size 711x52
+        RenderText {#text} at (10,10) size 675x32
+          text run at (10,10) width 675: "This test has failed, if you don't see any graphics on the background. (your user agent does not support SVG as"
+          text run at (10,26) width 122: "background image)."
+      RenderBlock {p} at (10,245) size 711x36
+        RenderInline {a} at (0,0) size 29x16 [color=#000066]
+          RenderText {#text} at (10,10) size 29x16
+            text run at (10,10) width 29: "Back"
diff --git a/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.png b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.png
new file mode 100644 (file)
index 0000000..f6e5b46
Binary files /dev/null and b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.txt b/LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.txt
new file mode 100644 (file)
index 0000000..5feeeef
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {html} at (0,0) size 800x600
+    RenderBody {body} at (48,30) size 752x156
+      RenderBlock {h1} at (0,0) size 691x31
+        RenderText {#text} at (0,0) size 383x30
+          text run at (0,0) width 383: "scalable fullscreen background"
+      RenderBlock {h4} at (0,31) size 752x16
+        RenderText {#text} at (0,0) size 125x16
+          text run at (0,0) width 125: "WICD Core 1.0 #12"
+      RenderBlock {p} at (0,66) size 691x32
+        RenderText {#text} at (0,0) size 676x32
+          text run at (0,0) width 614: "This text is XHTML main layer content, which must overlay a lightblue SVG-background image with "
+          text run at (614,0) width 62: "text ('SVG"
+          text run at (0,16) width 618: "background image'). The SVG background image must cover the complete XHTML-background area."
+      RenderBlock {p} at (0,103) size 691x32
+        RenderText {#text} at (0,0) size 675x32
+          text run at (0,0) width 675: "This test has failed, if you don't see any graphics on the background. (your user agent does not support SVG as"
+          text run at (0,16) width 122: "background image)."
+      RenderBlock {p} at (0,140) size 691x16
+        RenderInline {a} at (0,0) size 29x16 [color=#000066]
+          RenderText {#text} at (0,0) size 29x16
+            text run at (0,0) width 29: "Back"
diff --git a/LayoutTests/svg/wicd/resources/test-scalable-background-image1.css b/LayoutTests/svg/wicd/resources/test-scalable-background-image1.css
new file mode 100644 (file)
index 0000000..4d97230
--- /dev/null
@@ -0,0 +1,10 @@
+html{
+
+}
+body{
+       padding:10px;
+}
+p{
+       padding:10px;
+       background:url('test-scalable-background-image1.svg');
+}
diff --git a/LayoutTests/svg/wicd/resources/test-scalable-background-image1.svg b/LayoutTests/svg/wicd/resources/test-scalable-background-image1.svg
new file mode 100644 (file)
index 0000000..9b216d0
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none">
+
+<defs>
+    <linearGradient id="bgGrad" x1="0" y1="0" x2="0" y2="1">
+        <stop offset="0" stop-color="#CCC"/>
+        <stop offset="0.3" stop-color="#FFF"/>
+        <stop offset="0.6" stop-color="#FFF"/>
+        <stop offset="1" stop-color="#999"/>
+    </linearGradient>
+    <linearGradient id="strokeGrad" x1="0" y1="0" x2="0" y2="1">
+        <stop offset="0" stop-color="#FFF"/>
+        <stop offset="0.4" stop-color="#999"/>
+        <stop offset="0.6" stop-color="#999"/>
+        <stop offset="1" stop-color="#666"/>
+    </linearGradient>
+</defs>
+
+<rect x="1%" y="1%" width="98%" height="98%" fill="url(#bgGrad)" stroke="url(#strokeGrad)" stroke-width="1" rx="10" ry="10"/>
+
+</svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/wicd/resources/test-scalable-background-image2.css b/LayoutTests/svg/wicd/resources/test-scalable-background-image2.css
new file mode 100644 (file)
index 0000000..1eb2f77
--- /dev/null
@@ -0,0 +1,4 @@
+html{\r
+       height:100%;\r
+       background:url('test-scalable-background-image2.svg') no-repeat fixed center center;\r
+}\r
diff --git a/LayoutTests/svg/wicd/resources/test-scalable-background-image2.svg b/LayoutTests/svg/wicd/resources/test-scalable-background-image2.svg
new file mode 100644 (file)
index 0000000..840e5b2
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 320" preserveAspectRatio="none">
+
+<!-- background - lightgrey rectangle horizontally and vertically exceeding viewBox -->
+<rect x="-1000" y="-1000" fill="#66F" width="2240" height="2320"/>
+
+<defs>
+    <linearGradient id="bgGrad" x1="0" y1="0" x2="0.8" y2="1">
+        <stop offset="0" stop-opacity="0" stop-color="#EEF"/>
+        <stop offset="0.8"  stop-opacity="1" stop-color="#CDF"/>
+        <stop offset="1" stop-opacity="0.6" stop-color="#CDF"/>
+    </linearGradient>
+</defs>
+
+<!-- border - stroked rectangle hinting dimensions of viewBox -->
+<rect x="0" y="0" width="240" height="320" fill="url(#bgGrad)"/>
+
+<!-- some content -->
+<g fill="#369" fill-opacity="0.3" text-anchor="middle" font-family="Georgia,Times,serif" transform="translate(60 70) skewX(-10) rotate(10 120 160) scale(0.6)">
+       <text x="120" y="100" font-size="130">SVG</text>
+       <text x="120" y="166" font-size="106">back-</text>
+       <text x="120" y="230" font-size="80">ground</text>
+       <text x="120" y="300" font-size="90">image</text>
+</g>
+
+<circle cx="-30" cy="290" r="250" fill="#FFF" fill-opacity="0.2"/>
+<circle cx="-130" cy="320" r="270" fill="#FFF" fill-opacity="0.2"/>
+</svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/wicd/test-scalable-background-image1.xhtml b/LayoutTests/svg/wicd/test-scalable-background-image1.xhtml
new file mode 100644 (file)
index 0000000..ada561d
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>WICD Core 1.0 #11 - scalable CSS background</title>
+  <link rel="stylesheet" type="text/css" href="resources/main.css"/>
+  <link rel="stylesheet" type="text/css" href="resources/test-scalable-background-image1.css"/>
+</head>
+<body>
+  <h1>scalable CSS background</h1>
+  <h4>WICD Core 1.0 #11</h4>
+  <p>
+    This text paragraph, as well as all following, must have a SVG background image. 
+  </p>
+  <p>
+      This background image (grey color-gradient and rounded corners) must always exactly fit the text paragraph.
+  </p>
+  <p>
+    This test has failed, if you don't see any graphics on the background. (your user agent does not support SVG as background image).
+  </p>
+  <p><a href="javascript:history.back()">Back</a></p>
+</body>
+</html>
diff --git a/LayoutTests/svg/wicd/test-scalable-background-image2.xhtml b/LayoutTests/svg/wicd/test-scalable-background-image2.xhtml
new file mode 100644 (file)
index 0000000..bc30dbf
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+  <title>WICD Core 1.0 #12 - scalable fullscreen background</title>\r
+  <link rel="stylesheet" type="text/css" href="resources/main.css"/>\r
+  <link rel="stylesheet" type="text/css" href="resources/test-scalable-background-image2.css"/>\r
+</head>\r
+<body>\r
+  <h1>scalable fullscreen background</h1>\r
+  <h4>WICD Core 1.0 #12</h4>\r
+  <p>\r
+    This text is XHTML main layer content, which must overlay a lightblue SVG-background image with\r
+      text ('SVG background image'). The SVG background image must cover the complete XHTML-background area.\r
+  </p>\r
+  <p>\r
+    This test has failed, if you don't see any graphics on the background. (your user agent does not support SVG as background image).\r
+  </p>\r
+  <p><a href="javascript:history.back()">Back</a></p>\r
+</body>\r
+</html>\r