~mterry/unity8/oobe-revert-geonames

« back to all changes in this revision

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

  • Committer: Michael Terry
  • Date: 2016-03-11 17:51:18 UTC
  • mfrom: (1821.227.75 unity8)
  • Revision ID: michael.terry@canonical.com-20160311175118-6za2cj41c21d88ha
Merge silo 64 (soon to be trunk)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
    property var shareData: {
30
30
        "uri": [
31
 
                    "Text here",
32
 
                    "text here 2",
33
 
                    "text here 3"
 
31
                    "file:///this/is/an/url",
 
32
                    "file:///this/is/an/url/2",
 
33
                    "file:///this/is/an/url/3"
34
34
                ],
35
35
        "content-type": "text"
36
36
    }
37
37
 
 
38
    property var shareDataString: {
 
39
        "uri": "file:///this/is/an/url",
 
40
        "content-type": "text"
 
41
    }
 
42
 
38
43
    PreviewSharing {
39
44
        id: previewSharing
40
45
        anchors { left: parent.left; bottom: parent.bottom; }
55
60
            mouseClick(previewSharing);
56
61
            compare(peerPicker.visible, true);
57
62
        }
 
63
 
 
64
        function test_createExportedItems() {
 
65
            var exportedItems = previewSharing.createExportedItems(shareData["uri"]);
 
66
            for (var i = 0; i < exportedItems.length; i++) {
 
67
                compare(exportedItems[i].url, shareData["uri"][i]);
 
68
            }
 
69
            exportedItems = previewSharing.createExportedItems(shareDataString["uri"]);
 
70
            compare(exportedItems[0].url, shareDataString["uri"]);
 
71
        }
58
72
    }
59
73
}