@@ -1,5 +1,21 @@
2+ * Copyright (C) 2014 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2import QtQuick 2.3
17import QtQuick 2.3
3import Ubuntu.Components 1.1
19import Ubuntu.Components 1.1
4import Dash 0.1
20import Dash 0.1
@@ -10,6 +26,7 @@ Rectangle {
10 color: "red"
26 color: "red"
12 CroppedImageMinimumSourceSize {
28 CroppedImageMinimumSourceSize {
15 width: 100
32 width: 100
@@ -17,5 +34,16 @@ Rectangle {
17 source: Qt.resolvedUrl("../../qmltests/Dash/artwork/music-player-design.png")
34 source: Qt.resolvedUrl("../../qmltests/Dash/artwork/music-player-design.png")
18 asynchronous: true
35 asynchronous: true
43+ function test_croppedSource() {
44+ tryCompare(cimss.image.sourceSize, "width", 100);
45+ tryCompare(cimss.image.sourceSize, "height", 0);