~nick-dedekind/unity8/indicator-color-fixes

« back to all changes in this revision

Viewing changes to tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml

  • Committer: Nick Dedekind
  • Date: 2016-02-29 14:24:55 UTC
  • mfrom: (2143.1.65 unity8)
  • Revision ID: nick.dedekind@canonical.com-20160229142455-ol76uyr8pin7l5r6
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        , "fallback": "../../../tests/graphics/clock@18.png"
49
49
    }
50
50
 
 
51
    property var sourcesModelEmptyWithFallback: {
 
52
        "sources": [
 
53
                    "../../graphics/phone_background.jpg",
 
54
                    "../../graphics/tablet_background.jpg",
 
55
                    "../../../tests/graphics/clock@18.png",
 
56
                    ""
 
57
                   ]
 
58
        , "fallback": "../../../tests/graphics/clock@18.png"
 
59
    }
 
60
 
51
61
    PreviewImageGallery {
52
62
        id: imageGallery
53
63
        width: parent.width
123
133
            image3 = findChild(imageGallery, "previewImage3");
124
134
            tryCompare(image3, "state", "ready");
125
135
        }
 
136
 
 
137
        function test_empty_fallback() {
 
138
            var image3 = findChild(imageGallery, "previewImage3");
 
139
            tryCompare(image3, "state", "error");
 
140
            imageGallery.widgetData = sourcesModel0;
 
141
            imageGallery.widgetData = sourcesModelEmptyWithFallback;
 
142
            image3 = findChild(imageGallery, "previewImage3");
 
143
            tryCompare(image3, "state", "ready");
 
144
        }
126
145
    }
127
146
}