@@ -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,19 +26,24 @@ Rectangle {
10 color: "red"
26 color: "red"
12 CroppedImageMinimumSourceSize {
28 CroppedImageMinimumSourceSize {
15 width: 100
32 width: 100
16 height: 100
33 height: 100
17− source: Qt.resolvedUrl("../../qmltests/Dash/artwork/avatar.png")
34+ source: Qt.resolvedUrl("../../qmltests/Dash/artwork/music-player-design.png")
20− CroppedImageMinimumSourceSize {
38+ TestCase {
21− x: 300
39+ id: testCase
22− y: 100
40+ name: "ScopeStyle"
23− width: 100
41+ when: windowShown
25− source: "http://assets.ubuntu.com/sites/ubuntu/latest/u/img/homepage/1410/1410-wallpaper.jpg"
43+ function test_croppedSource() {
44+ tryCompare(cimss.image.sourceSize, "width", 100);
45+ tryCompare(cimss.image.sourceSize, "height", 0);