Skip to content

Commit

Permalink
Skip some font loader tests for Windows
Browse files Browse the repository at this point in the history
Windows currently does not support font loader yet.

Change-Id: I370e41c1f2e2a45787741414a6e7bf00cc3f6c3e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
  • Loading branch information
yinyunqiao authored and Qt by Nokia committed Mar 19, 2012
1 parent 9895f6e commit ba8a50a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
Expand Up @@ -116,6 +116,9 @@ void tst_qquickfontloader::namedFont()

void tst_qquickfontloader::localFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("tarzeau_ocr_a.ttf").toString() + "\" }";
QQmlComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
Expand All @@ -129,6 +132,9 @@ void tst_qquickfontloader::localFont()

void tst_qquickfontloader::failLocalFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("dummy.ttf").toString() + "\" }";
QTest::ignoreMessage(QtWarningMsg, QString("file::2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + "\"").toUtf8().constData());
QQmlComponent component(&engine);
Expand All @@ -143,6 +149,9 @@ void tst_qquickfontloader::failLocalFont()

void tst_qquickfontloader::webFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }";
QQmlComponent component(&engine);

Expand All @@ -157,6 +166,9 @@ void tst_qquickfontloader::webFont()

void tst_qquickfontloader::redirWebFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf");

QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }";
Expand All @@ -173,6 +185,9 @@ void tst_qquickfontloader::redirWebFont()

void tst_qquickfontloader::failWebFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }";
QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML FontLoader: Cannot load font: \"http://localhost:14448/nonexist.ttf\"");
QQmlComponent component(&engine);
Expand All @@ -187,6 +202,9 @@ void tst_qquickfontloader::failWebFont()

void tst_qquickfontloader::changeFont()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QString componentStr = "import QtQuick 2.0\nFontLoader { source: font }";
QQmlContext *ctxt = engine.rootContext();
ctxt->setContextProperty("font", testFileUrl("tarzeau_ocr_a.ttf"));
Expand Down Expand Up @@ -226,6 +244,9 @@ void tst_qquickfontloader::changeFont()

void tst_qquickfontloader::changeFontSourceViaState()
{
#if defined(Q_OS_WIN)
QSKIP("Windows doesn't support font loading.");
#endif
QQuickView canvas(testFileUrl("qtbug-20268.qml"));
canvas.show();
canvas.requestActivateWindow();
Expand Down

0 comments on commit ba8a50a

Please sign in to comment.