~zsombi/ubuntu-ui-toolkit/03-styleditem-styleset

« back to all changes in this revision

Viewing changes to tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp

  • Committer: Zsombor Egri
  • Date: 2015-03-10 13:10:20 UTC
  • Revision ID: zsombor.egri@canonical.com-20150310131020-4bp3vzgocgueormv
App theming moved into its own test

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    void testThemesRelativePathWithParentXDGDATA();
82
82
    void testThemesRelativePathWithParentNoVariablesSet();
83
83
    void testThemesRelativePathWithParentOneXDGPathSet();
84
 
    void testAppTheme();
85
84
    void testNoImportPathSet();
86
85
    void testBogusImportPathSet();
87
86
    void testMultipleImportPathsSet();
208
207
    QCOMPARE(style != NULL, true);
209
208
}
210
209
 
211
 
void tst_UCDeprecatedTheme::testAppTheme()
212
 
{
213
 
    QScopedPointer<ThemeTestCase> test(new ThemeTestCase("TestApp.qml"));
214
 
    QColor backgroundColor = test->rootObject()->property("backgroundColor").value<QColor>();
215
 
    QCOMPARE(backgroundColor, QColor("#A21E1C"));
216
 
    QQuickText *label = test->findItem<QQuickText*>("test_label");
217
 
    QVERIFY(label);
218
 
    QCOMPARE(label->color(), QColor("lightblue"));
219
 
}
220
 
 
221
210
void tst_UCDeprecatedTheme::testNoImportPathSet()
222
211
{
223
212
    if (!QFile(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + "/Ubuntu/Components").exists())