summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml')
-rw-r--r--tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml b/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml
index 5960e53557..93f85107a7 100644
--- a/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml
+++ b/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml
@@ -677,5 +677,27 @@ CanvasTestCase {
waitForRendering(implicitlySizedItem);
comparePixel(implicitlySizedItem.canvas.context, xCenter, yCenter, 0, 0, 0, 255);
}
+
+ Component {
+ id: simpleTextureNodeUsageComponent
+
+ Canvas {
+ id: canvas
+ anchors.fill: parent
+
+ onPaint: {
+ var ctx = canvas.getContext("2d");
+ ctx.clearRect(0, 0, 200, 200);
+ }
+ }
+ }
+
+ function test_simpleTextureNodeUsage() {
+ var canvas = simpleTextureNodeUsageComponent.createObject(container);
+ verify(canvas);
+ wait(0);
+ // Shouldn't crash.
+ canvas.requestPaint();
+ }
}
}