Canvas test: make sure canvas is ready
before: Totals: 80 passed, 653 failed, 0 skipped, 0 blacklisted, 35852ms after: Totals: 729 passed, 4 failed, 0 skipped, 0 blacklisted, 29599ms The last four failures are due to high dpi issues. Change-Id: Ie937091558395572dc281ee5a5b90848ea9d2081 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
e7d6606e2d
commit
827af02890
|
@ -31,7 +31,9 @@ TestCase {
|
|||
}
|
||||
|
||||
function createCanvasObject(data) {
|
||||
return component.createObject(testCase, data.properties);
|
||||
var canvas = component.createObject(testCase, data.properties);
|
||||
waitForRendering(canvas);
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function comparePixel(ctx,x,y,r,g,b,a, d)
|
||||
|
|
|
@ -590,6 +590,7 @@ CanvasTestCase {
|
|||
verify(canvas);
|
||||
canvas.width = 100;
|
||||
canvas.height = 100;
|
||||
waitForRendering(canvas);
|
||||
|
||||
var ctx = canvas.getContext("2d");
|
||||
|
||||
|
|
|
@ -667,6 +667,7 @@ CanvasTestCase {
|
|||
var canvas2 = Qt.createQmlObject("import QtQuick 2.0; Canvas{renderTarget:Canvas.Image; renderStrategy:Canvas.Immediate}", canvas);
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
waitForRendering(canvas2);
|
||||
var ctx2 = canvas2.getContext('2d');
|
||||
ctx2.fillStyle = '#0f0';
|
||||
ctx2.fillRect(0, 0, 100, 50);
|
||||
|
|
Loading…
Reference in New Issue