@@ -1,5 +1,21 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
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.
7+ *
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.
12+ *
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/>.
15+ */
116
217import QtQuick 2.3
18+import QtTest 1.0
319import Ubuntu.Components 1.1
420import Dash 0.1
521
@@ -10,6 +26,7 @@ Rectangle {
1026 color: "red"
1127
1228 CroppedImageMinimumSourceSize {
29+ id: cimss
1330 x: 100
1431 y: 100
1532 width: 100
@@ -17,5 +34,16 @@ Rectangle {
1734 source: Qt.resolvedUrl("../../qmltests/Dash/artwork/music-player-design.png")
1835 asynchronous: true
1936 }
37+
38+ TestCase {
39+ id: testCase
40+ name: "ScopeStyle"
41+ when: windowShown
42+
43+ function test_croppedSource() {
44+ tryCompare(cimss.image.sourceSize, "width", 100);
45+ tryCompare(cimss.image.sourceSize, "height", 0);
46+ }
47+ }
2048}
2149