Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html

Issue 2602253002: Fixed WebglRenderingContextBase toImageData (Closed)
Patch Set: fix error Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html
index 61c4f5c4b117d39c33c90763180822cb5107b218..6de349fee9b918f6c6adf793b0468752e94ffc59 100644
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main-expected.html
@@ -1,16 +1,30 @@
<img id="png"/>
-<script>
+<img id="jpeg-high"/>
+<img id="jpeg-low"/>
+<img id="webp-high"/>
+<img id="webp-low"/>
+<script type="text/javascript">
if (window.testRunner) {
testRunner.waitUntilDone();
}
var pngImage = document.getElementById('png');
+var jpegImageHigh = document.getElementById('jpeg-high');
+var jpegImageLow = document.getElementById('jpeg-low');
+var webpImageHigh = document.getElementById('webp-high');
+var webpImageLow = document.getElementById('webp-low');
+var numTestCount = 5;
function imageLoaded() {
- if (window.testRunner) {
+ numTestCount--;
+ if (numTestCount == 0 && window.testRunner) {
window.testRunner.notifyDone();
}
}
pngImage.addEventListener('load', imageLoaded);
+jpegImageHigh.addEventListener('load', imageLoaded);
+jpegImageLow.addEventListener('load', imageLoaded);
+webpImageHigh.addEventListener('load', imageLoaded);
+webpImageLow.addEventListener('load', imageLoaded);
var canvas = document.createElement("canvas");
canvas.width = 50;
@@ -22,5 +36,22 @@ gl.clear(gl.COLOR_BUFFER_BIT);
canvas.toBlob(function(blob) {
pngImage.src = URL.createObjectURL(blob);
});
+
+canvas.toBlob(function(blob) {
+ jpegImageHigh.src = URL.createObjectURL(blob);
+}, "image/jpeg", 1.0);
+
+canvas.toBlob(function(blob) {
+ jpegImageLow.src = URL.createObjectURL(blob);
+}, "image/jpeg", 0.2)
+
+canvas.toBlob(function(blob) {
+ webpImageHigh.src = URL.createObjectURL(blob);
+}, "image/webp", 1.0);
+
+canvas.toBlob(function(blob) {
+ webpImageLow.src = URL.createObjectURL(blob);
+}, "image/webp", 0.2);
+
</script>

Powered by Google App Engine
This is Rietveld 408576698