diff options
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index a42fdc9be3..d85b974175 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -260,6 +260,7 @@ private slots: void urlListPropertyWithEncoding(); void dynamicString(); void include(); + void includeRemoteSuccess(); void signalHandlers(); void doubleEvaluate(); void forInLoop(); @@ -5955,52 +5956,57 @@ void tst_qqmlecmascript::include() delete o; } - // Remote - success + // Remote - error { TestHTTPServer server(8111); QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QQmlComponent component(&engine, testFileUrl("include_remote.qml")); + QQmlComponent component(&engine, testFileUrl("include_remote_missing.qml")); QObject *o = component.create(); QVERIFY(o != 0); QTRY_VERIFY(o->property("done").toBool() == true); - QTRY_VERIFY(o->property("done2").toBool() == true); QCOMPARE(o->property("test1").toBool(), true); QCOMPARE(o->property("test2").toBool(), true); QCOMPARE(o->property("test3").toBool(), true); - QCOMPARE(o->property("test4").toBool(), true); - QCOMPARE(o->property("test5").toBool(), true); - - QCOMPARE(o->property("test6").toBool(), true); - QCOMPARE(o->property("test7").toBool(), true); - QCOMPARE(o->property("test8").toBool(), true); - QCOMPARE(o->property("test9").toBool(), true); - QCOMPARE(o->property("test10").toBool(), true); delete o; } +} - // Remote - error - { +void tst_qqmlecmascript::includeRemoteSuccess() +{ +#if defined(Q_CC_MSVC) && _MSC_VER == 1700 + QSKIP("This test does not work reliably with MSVC2012 on Win8 64-bit in release mode."); +#endif + + // Remote - success TestHTTPServer server(8111); QVERIFY(server.isValid()); server.serveDirectory(dataDirectory()); - QQmlComponent component(&engine, testFileUrl("include_remote_missing.qml")); + QQmlComponent component(&engine, testFileUrl("include_remote.qml")); QObject *o = component.create(); QVERIFY(o != 0); QTRY_VERIFY(o->property("done").toBool() == true); + QTRY_VERIFY(o->property("done2").toBool() == true); QCOMPARE(o->property("test1").toBool(), true); QCOMPARE(o->property("test2").toBool(), true); QCOMPARE(o->property("test3").toBool(), true); + QCOMPARE(o->property("test4").toBool(), true); + QCOMPARE(o->property("test5").toBool(), true); + + QCOMPARE(o->property("test6").toBool(), true); + QCOMPARE(o->property("test7").toBool(), true); + QCOMPARE(o->property("test8").toBool(), true); + QCOMPARE(o->property("test9").toBool(), true); + QCOMPARE(o->property("test10").toBool(), true); delete o; - } } void tst_qqmlecmascript::signalHandlers() |