aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp2
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.cpp7
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h2
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/exportDate.2.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/exportDate.qml2
-rw-r--r--tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp66
-rw-r--r--tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro2
12 files changed, 80 insertions, 13 deletions
diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
index a98160e0db..2b9efb62d7 100644
--- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -179,7 +179,7 @@ void tst_QDebugMessageService::cleanupTestCase()
void tst_QDebugMessageService::init()
{
m_connection = new QQmlDebugConnection();
- m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+ m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
m_client = new QQmlDebugMsgClient(m_connection);
m_process->start(QStringList() << QLatin1String(NORMALMODE) << QQmlDataTest::instance()->testFile(QMLFILE));
diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
index ef82d82c8e..b958a27af5 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -1002,7 +1002,7 @@ void tst_QQmlDebugJS::cleanupTestCase()
bool tst_QQmlDebugJS::init(const QString &qmlFile, bool blockMode)
{
connection = new QQmlDebugConnection();
- process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+ process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
client = new QJSDebugClient(connection);
if (blockMode)
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
index 3ee66fc5b8..19a39c5656 100644
--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
@@ -108,7 +108,7 @@ void tst_QQmlEngineDebugInspectorIntegration::init()
const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
- + "/qmlscene");
+ + "/qmlscene", this);
m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
QVERIFY2(m_process->waitForSessionStart(),
"Could not launch application, or did not get 'Waiting for connection'.");
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index 7a75f7b1d5..f1a6c23a3f 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -86,7 +86,7 @@ void tst_QQmlInspector::init()
{
const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
- m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+ m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
QVERIFY2(m_process->waitForSessionStart(),
"Could not launch application, or did not get 'Waiting for connection'.");
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index dec4ab3449..d8b538d79e 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -240,7 +240,7 @@ void tst_QQmlProfilerService::connect(bool block, const QString &testFile)
arguments << QQmlDataTest::instance()->testFile(testFile);
- m_process = new QQmlDebugProcess(executable);
+ m_process = new QQmlDebugProcess(executable, this);
m_process->start(QStringList() << arguments);
QVERIFY2(m_process->waitForSessionStart(), "Could not launch application, or did not get 'Waiting for connection'.");
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp
index 06aba83bcb..df8042ca11 100644
--- a/tests/auto/qml/debugger/shared/debugutil.cpp
+++ b/tests/auto/qml/debugger/shared/debugutil.cpp
@@ -83,8 +83,9 @@ void QQmlDebugTestClient::messageReceived(const QByteArray &ba)
emit serverMessage(ba);
}
-QQmlDebugProcess::QQmlDebugProcess(const QString &executable)
- : m_executable(executable)
+QQmlDebugProcess::QQmlDebugProcess(const QString &executable, QObject *parent)
+ : QObject(parent)
+ , m_executable(executable)
, m_started(false)
{
m_process.setProcessChannelMode(QProcess::MergedChannels);
@@ -183,7 +184,7 @@ void QQmlDebugProcess::processAppOutput()
const QString line = m_outputBuffer.left(nlIndex);
m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1);
- if (line.startsWith("QML Debugger:")) {
+ if (line.contains("QML Debugger:")) {
if (line.contains("Waiting for connection ")) {
m_timer.stop();
m_started = true;
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index e5e8878996..0791d05205 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -84,7 +84,7 @@ class QQmlDebugProcess : public QObject
{
Q_OBJECT
public:
- QQmlDebugProcess(const QString &executable);
+ QQmlDebugProcess(const QString &executable, QObject *parent = 0);
~QQmlDebugProcess();
QString state();
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 840030daba..87d2673c2f 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -1965,7 +1965,6 @@ void tst_QJSEngine::stringObjects()
QString pname = QString::number(i);
QVERIFY(obj.property(pname).isString());
QCOMPARE(obj.property(pname).toString(), QString(str.at(i)));
- QEXPECT_FAIL("", "FIXME: This is V8 issue 862. ECMA script standard 15.5.5.2 compliance.", Continue);
QVERIFY(!obj.deleteProperty(pname));
obj.setProperty(pname, 123);
QVERIFY(obj.property(pname).isString());
@@ -2004,7 +2003,6 @@ void tst_QJSEngine::stringObjects()
QJSValue ret5 = eng.evaluate("delete s[0]");
QVERIFY(ret5.isBool());
- QEXPECT_FAIL("", "FIXME: This is V8 bug, please report it! ECMA script standard 15.5.5.2", Abort);
QVERIFY(!ret5.toBool());
QJSValue ret6 = eng.evaluate("delete s[-1]");
diff --git a/tests/auto/qml/qqmlecmascript/data/exportDate.2.qml b/tests/auto/qml/qqmlecmascript/data/exportDate.2.qml
index 8ad75aabb0..4420cf846c 100644
--- a/tests/auto/qml/qqmlecmascript/data/exportDate.2.qml
+++ b/tests/auto/qml/qqmlecmascript/data/exportDate.2.qml
@@ -12,7 +12,7 @@ MyTypeObject {
// The test date is 2009-5-12 23:59:59 (local time)
var compare = new Date(2009, 5-1, 12, 23, 59, 59)
- var compareOffset = new Date().getTimezoneOffset()
+ var compareOffset = compare.getTimezoneOffset()
// The date is already in local time, so we can use the partial values directly
var dtAdjusted = dt
diff --git a/tests/auto/qml/qqmlecmascript/data/exportDate.qml b/tests/auto/qml/qqmlecmascript/data/exportDate.qml
index 13b35a9cb8..c42b092fc7 100644
--- a/tests/auto/qml/qqmlecmascript/data/exportDate.qml
+++ b/tests/auto/qml/qqmlecmascript/data/exportDate.qml
@@ -12,7 +12,7 @@ MyTypeObject {
// The test date is 2009-5-12 00:00:01 (local time)
var compare = new Date(2009, 5-1, 12, 0, 0, 1)
- var compareOffset = new Date().getTimezoneOffset()
+ var compareOffset = compare.getTimezoneOffset()
// The date is already in local time, so we can use the partial values directly
var dtAdjusted = dt
diff --git a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
index 028eb30f53..68f4553921 100644
--- a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
+++ b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
@@ -68,6 +68,8 @@ private slots:
void canAt();
void canClear();
void canCount();
+ void isReadable();
+ void isManipulable();
void append();
void at();
void clear();
@@ -128,6 +130,8 @@ void tst_qqmllistreference::qmllistreference_invalid()
QVERIFY(r.at(10) == 0);
QVERIFY(r.clear() == false);
QVERIFY(r.count() == 0);
+ QVERIFY(r.isReadable() == false);
+ QVERIFY(r.isManipulable() == false);
}
// Non-property
@@ -143,6 +147,8 @@ void tst_qqmllistreference::qmllistreference_invalid()
QVERIFY(r.at(10) == 0);
QVERIFY(r.clear() == false);
QVERIFY(r.count() == 0);
+ QVERIFY(r.isReadable() == false);
+ QVERIFY(r.isManipulable() == false);
}
// Non-list property
@@ -158,6 +164,8 @@ void tst_qqmllistreference::qmllistreference_invalid()
QVERIFY(r.at(10) == 0);
QVERIFY(r.clear() == false);
QVERIFY(r.count() == 0);
+ QVERIFY(r.isReadable() == false);
+ QVERIFY(r.isManipulable() == false);
}
}
@@ -343,6 +351,64 @@ void tst_qqmllistreference::canCount()
}
}
+void tst_qqmllistreference::isReadable()
+{
+ TestType *tt = new TestType;
+
+ {
+ QQmlListReference ref;
+ QVERIFY(ref.isReadable() == false);
+ }
+
+ {
+ QQmlListReference ref(tt, "blah");
+ QVERIFY(ref.isReadable() == false);
+ }
+
+ {
+ QQmlListReference ref(tt, "data");
+ QVERIFY(ref.isReadable() == true);
+ delete tt;
+ QVERIFY(ref.isReadable() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.count = 0;
+ QQmlListReference ref(&tt, "data");
+ QVERIFY(ref.isReadable() == false);
+ }
+}
+
+void tst_qqmllistreference::isManipulable()
+{
+ TestType *tt = new TestType;
+
+ {
+ QQmlListReference ref;
+ QVERIFY(ref.isManipulable() == false);
+ }
+
+ {
+ QQmlListReference ref(tt, "blah");
+ QVERIFY(ref.isManipulable() == false);
+ }
+
+ {
+ QQmlListReference ref(tt, "data");
+ QVERIFY(ref.isManipulable() == true);
+ delete tt;
+ QVERIFY(ref.isManipulable() == false);
+ }
+
+ {
+ TestType tt;
+ tt.property.count = 0;
+ QQmlListReference ref(&tt, "data");
+ QVERIFY(ref.isManipulable() == false);
+ }
+}
+
void tst_qqmllistreference::append()
{
TestType *tt = new TestType;
diff --git a/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro
index fcfdf23d33..f1fbfde0ec 100644
--- a/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro
+++ b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro
@@ -2,6 +2,8 @@ CONFIG += testcase
TARGET = tst_qqmlxmlhttprequest
macx:CONFIG -= app_bundle
+CONFIG+=insignificant_test # QTQAINFRA-573
+
INCLUDEPATH += ../../shared/
HEADERS += ../../shared/testhttpserver.h