diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-04 07:01:15 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-04 07:01:15 (GMT) |
commit | b55c5cdbf2303fe27da1ab4c0ea8f6d38d222c16 (patch) | |
tree | ea37604ee6d3f0fcda0ceaed47d6e0eb6b353c98 /tests | |
parent | 7add5c26d7d4bbef452c261d5cbb99ac740724a2 (diff) | |
parent | 86faae02ffa0067b46b22043cb138230451387ac (diff) | |
download | Qt-b55c5cdbf2303fe27da1ab4c0ea8f6d38d222c16.zip Qt-b55c5cdbf2303fe27da1ab4c0ea8f6d38d222c16.tar.gz Qt-b55c5cdbf2303fe27da1ab4c0ea8f6d38d222c16.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
4 files changed, 11 insertions, 5 deletions
diff --git a/tests/auto/declarative/examples/data/dummytest.qml b/tests/auto/declarative/examples/data/dummytest.qml index cd9d8fb..b20e907 100644 --- a/tests/auto/declarative/examples/data/dummytest.qml +++ b/tests/auto/declarative/examples/data/dummytest.qml @@ -2,4 +2,5 @@ import Qt.VisualTest 4.6 VisualTest { Frame { msec: 0 } + Frame { msec: 10 } } diff --git a/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml b/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml index bdf3290..d31787b 100644 --- a/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml +++ b/tests/auto/declarative/examples/data/webbrowser/webbrowser.qml @@ -2,5 +2,5 @@ import Qt.VisualTest 4.6 VisualTest { Frame { msec: 0 } - Frame { msec: 1000 } + Frame { msec: 2000 } } diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index d758101..2cbb916 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -182,9 +182,10 @@ void tst_examples::examples() QFileInfo fi(file); QFileInfo dir(fi.path()); - QFileInfo testdata("data/"+dir.baseName()+"/"+fi.baseName()); + QString script = "data/"+dir.baseName()+"/"+fi.baseName(); + QFileInfo testdata(script+".qml"); QStringList arguments; - arguments << "-script" << (testdata.exists() ? testdata.filePath() : QLatin1String("data/dummytest")) + arguments << "-script" << (testdata.exists() ? script : QLatin1String("data/dummytest")) << "-scriptopts" << "play,testerror,exitoncomplete,exitonfailure" << file; QProcess p; diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp index 3e86cab..fc47d41 100644 --- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp +++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp @@ -198,6 +198,8 @@ void tst_qmlgraphicstext::width() for (int i = 0; i < standard.size(); i++) { + QVERIFY(!Qt::mightBeRichText(standard.at(i))); // self-test + QFont f; QFontMetrics fm(f); int metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); @@ -208,11 +210,13 @@ void tst_qmlgraphicstext::width() QVERIFY(textObject != 0); QCOMPARE(textObject->width(), qreal(metricWidth)); - QVERIFY(textObject->textFormat() == QmlGraphicsText::PlainText); + QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format } for (int i = 0; i < richText.size(); i++) { + QVERIFY(Qt::mightBeRichText(richText.at(i))); // self-test + QTextDocument document; document.setHtml(richText.at(i)); document.setDocumentMargin(0); @@ -225,7 +229,7 @@ void tst_qmlgraphicstext::width() QVERIFY(textObject != 0); QCOMPARE(textObject->width(), qreal(documentWidth)); - QVERIFY(textObject->textFormat() == QmlGraphicsText::RichText); + QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format } } |