WebPImageDecoder progressive decodes fail to decode valid images
authornoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2012 05:19:52 +0000 (05:19 +0000)
committernoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2012 05:19:52 +0000 (05:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74062

Reviewed by Adam Barth.

Add test for a partial image load, and a test for a complete image load with a
pause to cause a progressive/incremental webp image decode.

* fast/images/resources/large.webp: Added.
* http/tests/images/webp-partial-load-expected.txt: Added.
* http/tests/images/webp-partial-load.html: Added.
* http/tests/images/webp-progressive-load-expected.txt: Added.
* http/tests/images/webp-progressive-load.html: Added.
* platform/chromium-linux/http/tests/images/webp-partial-load-expected.png: Added.
Result differs because the linux DRT network layers returns partial encoded image
data from the cache layer in multiples of 2048 bytes until all data is received.
* platform/chromium/http/tests/images/webp-partial-load-expected.png: Added.
* platform/chromium/http/tests/images/webp-progressive-load-expected.png: Added.
* platform/efl/TestExpectations: This port does not support webp images.
* platform/gtk/TestExpectations: ditto.
* platform/mac/Skipped: ditto.
* platform/qt/Skipped: ditto.
* platform/win/Skipped: ditto.
* platform/wincairo/Skipped: ditto.

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

15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/images/resources/large.webp [new file with mode: 0644]
LayoutTests/http/tests/images/webp-partial-load-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/images/webp-partial-load.html [new file with mode: 0644]
LayoutTests/http/tests/images/webp-progressive-load-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/images/webp-progressive-load.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/http/tests/images/webp-partial-load-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium/http/tests/images/webp-partial-load-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium/http/tests/images/webp-progressive-load-expected.png [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped

index 62c2bafc7621462a0c847bd0e41556e865ead0d4..1a0e6c754f4d4a8cfe4a7047b0b499d9fae2c423 100644 (file)
@@ -1,3 +1,30 @@
+2012-08-29  Noel Gordon  <noel.gordon@gmail.com>
+
+        WebPImageDecoder progressive decodes fail to decode valid images
+        https://bugs.webkit.org/show_bug.cgi?id=74062
+
+        Reviewed by Adam Barth.
+
+        Add test for a partial image load, and a test for a complete image load with a
+        pause to cause a progressive/incremental webp image decode.
+
+        * fast/images/resources/large.webp: Added.
+        * http/tests/images/webp-partial-load-expected.txt: Added.
+        * http/tests/images/webp-partial-load.html: Added.
+        * http/tests/images/webp-progressive-load-expected.txt: Added.
+        * http/tests/images/webp-progressive-load.html: Added.
+        * platform/chromium-linux/http/tests/images/webp-partial-load-expected.png: Added.
+        Result differs because the linux DRT network layers returns partial encoded image
+        data from the cache layer in multiples of 2048 bytes until all data is received.
+        * platform/chromium/http/tests/images/webp-partial-load-expected.png: Added.
+        * platform/chromium/http/tests/images/webp-progressive-load-expected.png: Added.
+        * platform/efl/TestExpectations: This port does not support webp images.
+        * platform/gtk/TestExpectations: ditto.
+        * platform/mac/Skipped: ditto.
+        * platform/qt/Skipped: ditto.
+        * platform/win/Skipped: ditto.
+        * platform/wincairo/Skipped: ditto.
+
 2012-08-29  Adam Barth  <abarth@webkit.org>
 
         security/crypto-random-values-limits.html test the exact value that causes us to throw
diff --git a/LayoutTests/fast/images/resources/large.webp b/LayoutTests/fast/images/resources/large.webp
new file mode 100644 (file)
index 0000000..b6db65e
Binary files /dev/null and b/LayoutTests/fast/images/resources/large.webp differ
diff --git a/LayoutTests/http/tests/images/webp-partial-load-expected.txt b/LayoutTests/http/tests/images/webp-partial-load-expected.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/LayoutTests/http/tests/images/webp-partial-load.html b/LayoutTests/http/tests/images/webp-partial-load.html
new file mode 100644 (file)
index 0000000..27b5337
--- /dev/null
@@ -0,0 +1,31 @@
+<img style="background-color: blue" >
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText(pixelTest = true);
+    testRunner.waitUntilDone();
+}
+
+function loadAndStall()
+{
+    return "http://127.0.0.1:8000/resources/load-and-stall.php";
+}
+
+function webpImage()
+{
+    return "?name=../../../fast/images/resources/test.webp&mimeType=image%2Fwebp";
+}
+
+function testDone()
+{
+    if (window.testRunner) testRunner.notifyDone();
+}
+
+function runTest()
+{
+    var image = document.getElementsByTagName('img')[0];
+    image.src = loadAndStall() + webpImage() + "&stallAt=2400&stallFor=60";
+    setTimeout(testDone, 500);
+}
+
+setTimeout(runTest, 1);
+</script>
diff --git a/LayoutTests/http/tests/images/webp-progressive-load-expected.txt b/LayoutTests/http/tests/images/webp-progressive-load-expected.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/LayoutTests/http/tests/images/webp-progressive-load.html b/LayoutTests/http/tests/images/webp-progressive-load.html
new file mode 100644 (file)
index 0000000..b67446f
--- /dev/null
@@ -0,0 +1,31 @@
+<img style="background-color: red" >
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText(pixelTest = true);
+    testRunner.waitUntilDone();
+}
+
+function loadAndStall()
+{
+    return "http://127.0.0.1:8000/resources/load-and-stall.php";
+}
+
+function webpImage()
+{
+    return "?name=../../../fast/images/resources/large.webp&mimeType=image%2Fwebp";
+}
+
+function testDone()
+{
+    if (window.testRunner) testRunner.notifyDone();
+}
+
+function runTest()
+{
+    var image = document.getElementsByTagName('img')[0];
+    image.src = loadAndStall() + webpImage() + "&stallAt=4237&stallFor=1";
+    setTimeout(testDone, 3000);
+}
+
+setTimeout(runTest, 1);
+</script>
diff --git a/LayoutTests/platform/chromium-linux/http/tests/images/webp-partial-load-expected.png b/LayoutTests/platform/chromium-linux/http/tests/images/webp-partial-load-expected.png
new file mode 100644 (file)
index 0000000..b419c99
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/http/tests/images/webp-partial-load-expected.png differ
diff --git a/LayoutTests/platform/chromium/http/tests/images/webp-partial-load-expected.png b/LayoutTests/platform/chromium/http/tests/images/webp-partial-load-expected.png
new file mode 100644 (file)
index 0000000..dc9d626
Binary files /dev/null and b/LayoutTests/platform/chromium/http/tests/images/webp-partial-load-expected.png differ
diff --git a/LayoutTests/platform/chromium/http/tests/images/webp-progressive-load-expected.png b/LayoutTests/platform/chromium/http/tests/images/webp-progressive-load-expected.png
new file mode 100644 (file)
index 0000000..cc55fac
Binary files /dev/null and b/LayoutTests/platform/chromium/http/tests/images/webp-progressive-load-expected.png differ
index 81b6cf561f4409ad344709c8b78d2b31727f93a9..cd10d57a12a2f0b49cca3913799e92e54f3b5f01 100644 (file)
@@ -568,6 +568,8 @@ BUGWK88045 : fast/dom/gc-attribute-node.html = TEXT
 // Requires WebP support.
 BUGWKEFL SKIP : fast/canvas/canvas-toDataURL-webp.html = PASS
 BUGWKEFL SKIP : fast/images/webp-image-decoding.html = PASS
+BUGWKEFL SKIP : http/tests/images/webp-partial-load.html = PASS
+BUGWKEFL SKIP : http/tests/images/webp-progressive-load.html = PASS
 
 // Requires MEDIA_SOURCE support.
 BUGWK95296 SKIP : http/tests/media/media-source = TEXT
index 3def68cae6ec39ccdd23b9c46372a9c6e194287d..3b696e5dc0330c1ca6acd78e2c0ecc9370d0d4f2 100644 (file)
@@ -222,6 +222,8 @@ BUGWKGTK SKIP : fast/forms/file/input-file-entries.html = TEXT
 // Requires WebP support.
 BUGWKGTK SKIP : fast/canvas/canvas-toDataURL-webp.html = TEXT
 BUGWKGTK SKIP : fast/images/webp-image-decoding.html = TEXT
+BUGWKGTK SKIP : http/tests/images/webp-partial-load.html = TEXT
+BUGWKGTK SKIP : http/tests/images/webp-progressive-load.html = TEXT
 
 // DataTransferItems is not yet implemented.
 BUGWKGTK SKIP : editing/pasteboard/data-transfer-items.html = TEXT
index c0ce5e7755acc1e81f4b4eb375771855f474794c..762897f3f06f856fe29d0d4a688aa060f60b5c53 100644 (file)
@@ -357,6 +357,8 @@ plugins/plugin-initiate-popup-window.html
 # Requires WebP support.
 fast/canvas/canvas-toDataURL-webp.html
 fast/images/webp-image-decoding.html
+http/tests/images/webp-partial-load.html
+http/tests/images/webp-progressive-load.html
 
 # Times out because plugins aren't allowed to execute JS after NPP_Destroy has been called in WebKit1's OOP plugins implementation http://webkit.org/b/48929
 plugins/evaluate-js-after-removing-plugin-element.html
index f1ead435228aad15c16ad509b2647aad9a4a6e6f..daa1d225e710caeb48f361b615638f533b477bd9 100644 (file)
@@ -1955,6 +1955,8 @@ fast/writing-mode/japanese-ruby-vertical-rl.html
 # Requires WebP support.
 fast/canvas/canvas-toDataURL-webp.html
 fast/images/webp-image-decoding.html
+http/tests/images/webp-partial-load.html
+http/tests/images/webp-progressive-load.html
 
 # [Qt] fast/text/emphasis-overlap.html fails
 # https://bugs.webkit.org/show_bug.cgi?id=51324
index db5c177271ac73ade960c6ada86d16f8eda65be9..9e9f57a831c336345cdda528815a0f4a2d756c07 100644 (file)
@@ -1313,6 +1313,8 @@ plugins/iframe-shims.html
 # Requires WebP support.
 fast/canvas/canvas-toDataURL-webp.html
 fast/images/webp-image-decoding.html
+http/tests/images/webp-partial-load.html
+http/tests/images/webp-progressive-load.html
 
 # Missing layoutTestController.findString() http://webkit.org/b/50234
 editing/text-iterator/findString.html
index 37f344c725581e56942897b3124fa1c424d58c36..78ee56672b091d4169d4a0bce7f8b1cd48d0dacc 100644 (file)
@@ -1828,6 +1828,8 @@ plugins/iframe-shims.html
 # Requires WebP support.
 fast/canvas/canvas-toDataURL-webp.html
 fast/images/webp-image-decoding.html
+http/tests/images/webp-partial-load.html
+http/tests/images/webp-progressive-load.html
 
 # Missing layoutTestController.findString() http://webkit.org/b/50234
 editing/text-iterator/findString.html