aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2012-11-23 11:03:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-09 10:21:56 +0100
commit276dcc3f1f156514cd296ae9d7480f7424bdff67 (patch)
tree4b083a3777d738fcc7c65ce4c8de20d273b5f0fb /tests
parent6163ae74d505a3e9733795c6ce63386038f826d1 (diff)
Update some QML tests and temporarily skip them
These tests should be skipped until the next V8 update is landed into QtJSBackend. The expected results of these tests currently check wrong behavior. These bugs have been already fixed in the official V8 thus we need to update and skip them until the fix is landed into QtJSBackend. Change-Id: I77d8ee50b45cd6599cbb5735ddef7d1461aeceab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp11
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp15
2 files changed, 11 insertions, 15 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 87d2673c2f..bbde5f4dae 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -2226,15 +2226,12 @@ void tst_QJSEngine::jsContinueInSwitch()
void tst_QJSEngine::jsShadowReadOnlyPrototypeProperty()
{
- // SpiderMonkey has different behavior than JSC and V8; it disallows
- // creating a property on the instance if there's a property with the
- // same name in the prototype, and that property is read-only. We
- // adopted that behavior in the old (4.5) QtScript back-end, but it
- // just seems weird -- and non-compliant. Adopt the JSC behavior instead.
+ QSKIP("Temporarily skip this test case until the next V8 update is landed into QtJSBackend.");
+
QJSEngine eng;
QVERIFY(eng.evaluate("o = {}; o.__proto__ = parseInt; o.length").isNumber());
- QCOMPARE(eng.evaluate("o.length = 123; o.length").toInt(), 123);
- QVERIFY(eng.evaluate("o.hasOwnProperty('length')").toBool());
+ QVERIFY(eng.evaluate("o.length = 123; o.length").toInt() != 123);
+ QVERIFY(!eng.evaluate("o.hasOwnProperty('length')").toBool());
}
void tst_QJSEngine::jsReservedWords_data()
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index a1a51d4965..a4cd325a95 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -1779,6 +1779,8 @@ Test file/lineNumbers for inline functions.
*/
void tst_qqmlecmascript::functionErrors()
{
+ QSKIP("Temporarily skip this test case until the next V8 update is landed into QtJSBackend.");
+
QQmlComponent component(&engine, testFileUrl("functionErrors.qml"));
QString url = component.url().toString();
@@ -1796,10 +1798,7 @@ void tst_qqmlecmascript::functionErrors()
object = componentTwo.create();
QVERIFY(object != 0);
- QString srpname = object->property("srp_name").toString();
-
- warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srpname
- + QLatin1String(" is not a function");
+ warning = url + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function");
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
delete object;
@@ -4057,6 +4056,8 @@ void tst_qqmlecmascript::scarceResources_other()
/* These tests require knowledge of state, since we test values after
performing signal or function invocation. */
+ QSKIP("Temporarily skip this test case until the next V8 update is landed into QtJSBackend.");
+
QPixmap origPixmap(100, 100);
origPixmap.fill(Qt::blue);
QString srp_name, expectedWarning;
@@ -4115,8 +4116,7 @@ void tst_qqmlecmascript::scarceResources_other()
QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
- srp_name = object->property("srp_name").toString();
- expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function");
+ expectedWarning = varComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function");
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.
@@ -4188,8 +4188,7 @@ void tst_qqmlecmascript::scarceResources_other()
QVERIFY(!object->property("scarceResourceCopy").isValid()); // not yet assigned, so should not be valid
eo = qobject_cast<ScarceResourceObject*>(QQmlProperty::read(object, "a").value<QObject*>());
QVERIFY(eo->scarceResourceIsDetached()); // should be no other copies of it at this stage.
- srp_name = object->property("srp_name").toString();
- expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object ") + srp_name + QLatin1String(" is not a function");
+ expectedWarning = variantComponentTwelve.url().toString() + QLatin1String(":16: TypeError: Property 'scarceResource' of object [object Object] is not a function");
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QMetaObject::invokeMethod(object, "retrieveScarceResource");
QVERIFY(!object->property("scarceResourceCopy").isValid()); // due to exception, assignment will NOT have occurred.