mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1103328 (Part 4) - Force decoding in test_has_transparency. r=tn
This commit is contained in:
parent
28d652639c
commit
113152d3b4
@ -27,6 +27,8 @@ const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const gContent = document.getElementById("content");
|
||||
|
||||
var gCanvas;
|
||||
var gCanvasCtx;
|
||||
var gImg;
|
||||
var gMyDecoderObserver;
|
||||
var gIsTestFinished = false;
|
||||
@ -99,6 +101,11 @@ function onLoad() {
|
||||
return;
|
||||
}
|
||||
ok(true, "Should successfully load " + gImg.src);
|
||||
|
||||
// Force decoding of the image.
|
||||
SimpleTest.executeSoon(function() {
|
||||
gCanvasCtx.drawImage(gImg, 0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function failTest() {
|
||||
@ -119,6 +126,8 @@ function cleanUpAndFinish() {
|
||||
|
||||
function main() {
|
||||
gFiles = testFiles();
|
||||
gCanvas = document.createElement('canvas');
|
||||
gCanvasCtx = gCanvas.getContext('2d');
|
||||
gImg = new Image();
|
||||
gImg.onload = onLoad;
|
||||
gImg.onerror = onError;
|
||||
|
Loading…
Reference in New Issue
Block a user