@@ -65,26 +65,30 @@ void ResultsTest::testAllColumns()
66void ResultsTest::testIconColumn_data()
66void ResultsTest::testIconColumn_data()
68+ QTest::addColumn<QString>("uri");
68 QTest::addColumn<QString>("giconString");
69 QTest::addColumn<QString>("giconString");
69 QTest::addColumn<QString>("result");
70 QTest::addColumn<QString>("result");
72+ QTest::newRow("unspecified") << "test:uri" << "" << "";
71− QTest::newRow("absolute path") << "/usr/share/icons/example.png" << "/usr/share/icons/example.png";
73+ QTest::newRow("absolute path") << "test:uri" << "/usr/share/icons/example.png" << "/usr/share/icons/example.png";
72− QTest::newRow("file uri") << "file:///usr/share/icons/example.png" << "file:///usr/share/icons/example.png";
74+ QTest::newRow("file uri") << "test:uri" << "file:///usr/share/icons/example.png" << "file:///usr/share/icons/example.png";
73− QTest::newRow("http uri") << "http://images.ubuntu.com/example.jpg" << "http://images.ubuntu.com/example.jpg";
75+ QTest::newRow("http uri") << "test:uri" << "http://images.ubuntu.com/example.jpg" << "http://images.ubuntu.com/example.jpg";
74− QTest::newRow("image uri") << "image://thumbnail/with/arguments?passed_to=ImageProvider" << "image://thumbnail/with/arguments?passed_to=ImageProvider";
76+ QTest::newRow("image uri") << "test:uri" << "image://thumbnail/with/arguments?passed_to=ImageProvider" << "image://thumbnail/with/arguments?passed_to=ImageProvider";
75− QTest::newRow("themed icon") << "accessories-other" << "image://theme/accessories-other";
77+ QTest::newRow("themed icon") << "test:uri" << "accessories-other" << "image://theme/accessories-other";
76− QTest::newRow("fileicon") << ". GFileIcon http://example.org/resource.gif" << "http://example.org/resource.gif";
78+ QTest::newRow("fileicon") << "test:uri" << ". GFileIcon http://example.org/resource.gif" << "http://example.org/resource.gif";
77− QTest::newRow("themedicon") << ". GThemedIcon accessories-other accessories generic" << "image://theme/accessories-other,accessories,generic";
79+ QTest::newRow("themedicon") << "test:uri" << ". GThemedIcon accessories-other accessories generic" << "image://theme/accessories-other,accessories,generic";
78− QTest::newRow("annotatedicon") << ". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'.%20GThemedIcon%20accessories-other%20accessories%20generic'%3E%7D" << "image://theme/accessories-other,accessories,generic";
80+ QTest::newRow("annotatedicon") << "test:uri" << ". UnityProtocolAnnotatedIcon %7B'base-icon':%20%3C'.%20GThemedIcon%20accessories-other%20accessories%20generic'%3E%7D" << "image://theme/accessories-other,accessories,generic";
81+ QTest::newRow("thumbnailer icon") << "file:///usr/share/samples/video/foo.avi" << "" << "image://thumbnailer//usr/share/samples/video/foo.avi";
81void ResultsTest::testIconColumn()
84void ResultsTest::testIconColumn()
86+ QFETCH(QString, uri);
83 QFETCH(QString, giconString);
87 QFETCH(QString, giconString);
84 QFETCH(QString, result);
88 QFETCH(QString, result);
85 auto deeModel = createBackendModel();
89 auto deeModel = createBackendModel();
86 dee_model_append (deeModel,
90 dee_model_append (deeModel,
87− "test:uri",
91+ uri.toLocal8Bit().constData(),
88 giconString.toLocal8Bit().constData(),
92 giconString.toLocal8Bit().constData(),