diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-23 00:36:58 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-23 00:36:58 (GMT) |
commit | 3a46e59a71487c375b303cd982707dc0743f6f93 (patch) | |
tree | 1978f27292e6dd02c20813864e1a11201b8d9491 /tests | |
parent | 3bfdd96b99aa346d055d97c648f8f553d557f998 (diff) | |
parent | 5f0a3cd6dbae87b5944c3cb31fdc294fc0ac1163 (diff) | |
download | Qt-3a46e59a71487c375b303cd982707dc0743f6f93.zip Qt-3a46e59a71487c375b303cd982707dc0743f6f93.tar.gz Qt-3a46e59a71487c375b303cd982707dc0743f6f93.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
41 files changed, 2842 insertions, 41 deletions
diff --git a/tests/auto/declarative/animations/data/badproperty1.qml b/tests/auto/declarative/animations/data/badproperty1.qml index df1a98d..6f31fe8 100644 --- a/tests/auto/declarative/animations/data/badproperty1.qml +++ b/tests/auto/declarative/animations/data/badproperty1.qml @@ -19,6 +19,6 @@ Rectangle { PropertyChanges { target: MyRect; border.color: "blue" } } transitions: Transition { - ColorAnimation { target: MyRect; to: "red"; property: "pen.colr"; duration: 1000 } + ColorAnimation { target: MyRect; to: "red"; property: "border.colr"; duration: 1000 } } } diff --git a/tests/auto/declarative/animations/data/badproperty2.qml b/tests/auto/declarative/animations/data/badproperty2.qml new file mode 100644 index 0000000..c7d1673 --- /dev/null +++ b/tests/auto/declarative/animations/data/badproperty2.qml @@ -0,0 +1,24 @@ +import Qt 4.6 + +Rectangle { + id: Wrapper + width: 240 + height: 320 + Rectangle { + id: MyRect + color: "red" + width: 50; height: 50 + x: 100; y: 100 + MouseRegion { + anchors.fill: parent + onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + } + } + states: State { + name: "state1" + PropertyChanges { target: MyRect; border.color: "blue" } + } + transitions: Transition { + ColorAnimation { target: MyRect; to: "red"; property: "border"; duration: 1000 } + } +} diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp index 2506337..73bed79 100644 --- a/tests/auto/declarative/animations/tst_animations.cpp +++ b/tests/auto/declarative/animations/tst_animations.cpp @@ -295,9 +295,15 @@ void tst_animations::badProperties() //make sure we get a runtime error { QmlEngine engine; - QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml")); - QTest::ignoreMessage(QtWarningMsg, "QML QmlColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"pen.colr\""); - QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c.create()); + + QmlComponent c1(&engine, QUrl("file://" SRCDIR "/data/badproperty1.qml")); + QTest::ignoreMessage(QtWarningMsg, "QML QmlColorAnimation (file://" SRCDIR "/data/badproperty1.qml:22:9) Cannot animate non-existant property \"border.colr\""); + QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(c1.create()); + QVERIFY(rect); + + QmlComponent c2(&engine, QUrl("file://" SRCDIR "/data/badproperty2.qml")); + QTest::ignoreMessage(QtWarningMsg, "QML QmlColorAnimation (file://" SRCDIR "/data/badproperty2.qml:22:9) Cannot animate read-only property \"border\""); + rect = qobject_cast<QmlGraphicsRectangle*>(c2.create()); QVERIFY(rect); //### should we warn here are well? diff --git a/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml b/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml index a8c1e91..412cca2 100644 --- a/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml +++ b/tests/auto/declarative/qmlgraphicspathview/data/pathview3.qml @@ -47,11 +47,10 @@ PathView { Rectangle { id: wrapper width: 85; height: 85; color: lColor - scale: wrapper.PathView.scale transform: Rotation { id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2 - axis.y: 1; axis.z: 0; angle: wrapper.PathView.angle + axis.y: 1; axis.z: 0 } } } diff --git a/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.html b/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.html new file mode 100644 index 0000000..bf059b9 --- /dev/null +++ b/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.html @@ -0,0 +1,10 @@ +<html> +<body topmargin=0 leftmargin=0> +<table width=120> +<tr><td> +<h1>Pixel Cache</h1> +This test is for the pixel cache. Because this is a long document, +as it scrolls, more of the document will need to be rendered. +If the pixelCacheSize is small, the first parts of the document will +no longer be in the cache when it returns. +</table> diff --git a/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.qml b/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.qml new file mode 100644 index 0000000..3467c65 --- /dev/null +++ b/tests/auto/declarative/qmlgraphicswebview/data/pixelCache.qml @@ -0,0 +1,8 @@ +import Test 1.0 + +MyWebView { + width: 100 + height: 100 + anchors.fill: parent + url: "pixelCache.html" +} diff --git a/tests/auto/declarative/qmlgraphicswebview/qmlgraphicswebview.pro b/tests/auto/declarative/qmlgraphicswebview/qmlgraphicswebview.pro index cce3df2..c81912b 100644 --- a/tests/auto/declarative/qmlgraphicswebview/qmlgraphicswebview.pro +++ b/tests/auto/declarative/qmlgraphicswebview/qmlgraphicswebview.pro @@ -2,7 +2,8 @@ load(qttest_p4) contains(QT_CONFIG,declarative): QT += declarative macx:CONFIG -= app_bundle -SOURCES += tst_qmlgraphicswebview.cpp +SOURCES += tst_qmlgraphicswebview.cpp testtypes.cpp +HEADERS += testtypes.h # Define SRCDIR equal to test's source directory DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qmlgraphicswebview/testtypes.cpp b/tests/auto/declarative/qmlgraphicswebview/testtypes.cpp new file mode 100644 index 0000000..e21f286 --- /dev/null +++ b/tests/auto/declarative/qmlgraphicswebview/testtypes.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "testtypes.h" + +void MyWebView::drawContents(QPainter *p, const QRect &r) +{ + pp += r.width()*r.height(); + QmlGraphicsWebView::drawContents(p,r); +} + +QML_DEFINE_TYPE(Test,1,0,MyWebView,MyWebView); diff --git a/tests/auto/declarative/qmlgraphicswebview/testtypes.h b/tests/auto/declarative/qmlgraphicswebview/testtypes.h new file mode 100644 index 0000000..7ab7c78 --- /dev/null +++ b/tests/auto/declarative/qmlgraphicswebview/testtypes.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef TESTTYPES_H +#define TESTTYPES_H + +#include <private/qmlgraphicswebview_p.h> + +class MyWebView : public QmlGraphicsWebView +{ + Q_OBJECT + Q_PROPERTY(int pixelsPainted READ pixelsPainted); + +public: + MyWebView() : pp(0) {} + + int pixelsPainted() const { return pp; } + + void drawContents(QPainter *p, const QRect &r); + +private: + int pp; +}; + +QML_DECLARE_TYPE(MyWebView); + +#endif // TESTTYPES_H diff --git a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp index da43e68..6bd28fb 100644 --- a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp +++ b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp @@ -49,6 +49,8 @@ #include <QtWebKit/qwebframe.h> #include <QtCore/qdir.h> #include <QtCore/qfile.h> +#include <QtGui/qpainter.h> +#include "testtypes.h" class tst_qmlgraphicswebview : public QObject { @@ -66,6 +68,7 @@ private slots: void setHtml(); void javaScript(); void cleanupTestCase(); + void pixelCache(); private: void checkNoErrors(const QmlComponent& component); @@ -353,6 +356,33 @@ void tst_qmlgraphicswebview::javaScript() QCOMPARE(wv->evaluateJavaScript("window.myjsname.qmlprop").toString(), QString("qmlvalue")); } +void tst_qmlgraphicswebview::pixelCache() +{ + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/pixelCache.qml")); + checkNoErrors(component); + MyWebView *wv = qobject_cast<MyWebView*>(component.create()); + QVERIFY(wv != 0); + QTRY_COMPARE(wv->progress(), 1.0); + QPixmap pm(150,150); + QPainter p(&pm); + wv->paint(&p,0,0); + const int expected = 120*(150+128); // 120 = width of HTML page, 150=pixmap height, 128=cache extra area + QCOMPARE(wv->pixelsPainted(), expected); + wv->paint(&p,0,0); + QCOMPARE(wv->pixelsPainted(), expected); // nothing new needed to be painted + wv->setPixelCacheSize(0); // clears the cache + wv->paint(&p,0,0); + QCOMPARE(wv->pixelsPainted(), expected*2); // everything needed to be painted + // Note that painted things always go into the cache (even if they don't "fit"), + // just that they will be removed if anything else needs to be painted. + wv->setPixelCacheSize(expected); // won't clear the cache + wv->paint(&p,0,0); + QCOMPARE(wv->pixelsPainted(), expected*2); // still there + wv->setPixelCacheSize(expected-1); // too small - will clear the cache + wv->paint(&p,0,0); + QCOMPARE(wv->pixelsPainted(), expected*3); // repainted +} + QTEST_MAIN(tst_qmlgraphicswebview) #include "tst_qmlgraphicswebview.moc" diff --git a/tests/auto/declarative/sql/data/error-b.js b/tests/auto/declarative/sql/data/error-b.js new file mode 100644 index 0000000..4dd0ecf --- /dev/null +++ b/tests/auto/declarative/sql/data/error-b.js @@ -0,0 +1,13 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-error-b", "1.0", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + db.transaction( + function(tx) { + tx.executeSql('INSERT INTO Greeting VALUES("junk","junk")'); + notexist[123] = "oops" + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/data/error-creation.js b/tests/auto/declarative/sql/data/error-creation.js new file mode 100644 index 0000000..92245fd --- /dev/null +++ b/tests/auto/declarative/sql/data/error-creation.js @@ -0,0 +1,12 @@ +function test() { + var r="transaction_not_finished"; + try { + var db = openDatabaseSync("QmlTestDB-creation", "2.0", "Test database from Qt autotests", 1000000); + } catch (err) { + if (err.message == "SQL: database version mismatch") + r = "passed"; + else + r = "WRONG ERROR="+err.message; + } + return r; +} diff --git a/tests/auto/declarative/sql/data/error-notransaction.js b/tests/auto/declarative/sql/data/error-notransaction.js new file mode 100644 index 0000000..b9cc647 --- /dev/null +++ b/tests/auto/declarative/sql/data/error-notransaction.js @@ -0,0 +1,15 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-data/error-notransaction", "1.0", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + try { + db.transaction(); + } catch (err) { + if (err.message == "transaction: missing callback") + r = "passed"; + else + r = "WRONG ERROR="+err.message; + } + + return r; +} diff --git a/tests/auto/declarative/sql/data/iteration-forwardonly.js b/tests/auto/declarative/sql/data/iteration-forwardonly.js new file mode 100644 index 0000000..45947c0 --- /dev/null +++ b/tests/auto/declarative/sql/data/iteration-forwardonly.js @@ -0,0 +1,29 @@ +function test() { + var db = openDatabaseSync("QmlTestDB-iteration-forwardonly", "", "Test database from Qt autotests", 1000000); + var r="transaction_not_finished"; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES ("Hello", "world")'); + tx.executeSql('INSERT INTO Greeting VALUES ("Goodbye", "cruel world")'); + } + ) + + db.transaction( + function(tx) { + var rs = tx.executeSql('SELECT * FROM Greeting'); + rs.forwardOnly = !rs.forwardOnly + var r1="" + for(var i = 0; i < rs.rows.length; i++) + r1 += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + ";" + if (r1 != "hello, world;hello, world;hello, world;hello, world;") + if (r1 != "Hello, world;Goodbye, cruel world;") + r = "SELECTED DATA WRONG: "+r1; + else + r = "passed"; + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/data/readonly-error.js b/tests/auto/declarative/sql/data/readonly-error.js new file mode 100644 index 0000000..ab82712 --- /dev/null +++ b/tests/auto/declarative/sql/data/readonly-error.js @@ -0,0 +1,28 @@ +function test() { + var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-readonly-error", "1.0", "Test database from Qt autotests", 1000000); + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + r = "passed"; + } + ); + + try { + db.readTransaction( + function(tx) { + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + r = "FAILED"; + } + ); + } catch (err) { + if (err.message == "Read-only Transaction") + r = "passed"; + else + r = "WRONG ERROR="+err.message; + } + + return r; +} diff --git a/tests/auto/declarative/sql/data/readonly.js b/tests/auto/declarative/sql/data/readonly.js new file mode 100644 index 0000000..5ee862c --- /dev/null +++ b/tests/auto/declarative/sql/data/readonly.js @@ -0,0 +1,24 @@ +function test() { + var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-readonly", "1.0", "Test database from Qt autotests", 1000000); + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + r = "passed"; + } + ); + + db.readTransaction( + function(tx) { + var rs = tx.executeSql('SELECT * FROM Greeting'); + if (rs.rows.item(0).salutation == 'hello') + r = "passed"; + else + r = "FAILED"; + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/data/reopen1.js b/tests/auto/declarative/sql/data/reopen1.js new file mode 100644 index 0000000..c1a8157 --- /dev/null +++ b/tests/auto/declarative/sql/data/reopen1.js @@ -0,0 +1,14 @@ +function test() { + var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000); + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); + tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); + r = "passed"; + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/data/reopen2.js b/tests/auto/declarative/sql/data/reopen2.js new file mode 100644 index 0000000..4f7248f --- /dev/null +++ b/tests/auto/declarative/sql/data/reopen2.js @@ -0,0 +1,16 @@ +function test() { + var r="transaction_not_finished"; + var db = openDatabaseSync("QmlTestDB-reopen", "1.0", "Test database from Qt autotests", 1000000); + + db.transaction( + function(tx) { + var rs = tx.executeSql('SELECT * FROM Greeting'); + if (rs.rows.item(0).salutation == 'hello') + r = "passed"; + else + r = "FAILED"; + } + ); + + return r; +} diff --git a/tests/auto/declarative/sql/sql.pro b/tests/auto/declarative/sql/sql.pro index 48e06a2..875e9d8 100644 --- a/tests/auto/declarative/sql/sql.pro +++ b/tests/auto/declarative/sql/sql.pro @@ -1,5 +1,6 @@ load(qttest_p4) contains(QT_CONFIG,declarative): QT += declarative +QT += script macx:CONFIG -= app_bundle SOURCES += tst_sql.cpp diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp index b5f98e3..4296279 100644 --- a/tests/auto/declarative/sql/tst_sql.cpp +++ b/tests/auto/declarative/sql/tst_sql.cpp @@ -43,10 +43,13 @@ #include <QtDeclarative/qmlengine.h> #include <QtDeclarative/qmlcomponent.h> #include <private/qmlgraphicstext_p.h> +#include <private/qmlengine_p.h> +#include <QtCore/qcryptographichash.h> #include <QtWebKit/qwebpage.h> #include <QtWebKit/qwebframe.h> #include <QtWebKit/qwebdatabase.h> #include <QtWebKit/qwebsecurityorigin.h> +#include <QtSql/qsqldatabase.h> #include <QtCore/qdir.h> #include <QtCore/qfile.h> @@ -72,11 +75,11 @@ private slots: void checkDatabasePath(); - void validateAgainstWebkit_data(); - void validateAgainstWebkit(); - void testQml_data(); void testQml(); + void testQml_cleanopen_data(); + void testQml_cleanopen(); + void totalDatabases(); void cleanupTestCase(); @@ -109,7 +112,6 @@ void tst_sql::initTestCase() { removeRecursive(dbDir()); QDir().mkpath(dbDir()); - } void tst_sql::cleanupTestCase() @@ -131,44 +133,40 @@ void tst_sql::checkDatabasePath() QVERIFY(engine->offlineStoragePath().contains("OfflineStorage")); } +static const int total_databases_created_by_tests = 12; void tst_sql::testQml_data() { QTest::addColumn<QString>("jsfile"); // The input file - QTest::addColumn<QString>("result"); // The required output from the js test() function - QTest::addColumn<int>("databases"); // The number of databases that should have been created - QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do // Each test should use a newly named DB to avoid inter-test dependencies - QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false; - QTest::newRow("creation-a") << "data/creation-a.js" << "passed" << 2 << false; - QTest::newRow("changeversion") << "data/changeversion.js" << "passed" << 3 << false; - QTest::newRow("selection") << "data/selection.js" << "passed" << 4 << false; - QTest::newRow("selection-bindnames") << "data/selection-bindnames.js" << "passed" << 5 << true; - QTest::newRow("iteration") << "data/iteration.js" << "passed" << 6 << false; - QTest::newRow("error-a") << "data/error-a.js" << "passed" << 7 << false; -} - -void tst_sql::validateAgainstWebkit_data() -{ - QTest::addColumn<QString>("jsfile"); // The input file - QTest::addColumn<QString>("result"); // The required output from the js test() function - QTest::addColumn<int>("databases"); // The number of databases that should have been created - QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do - QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false; + QTest::newRow("creation") << "data/creation.js"; + QTest::newRow("creation-a") << "data/creation-a.js"; + QTest::newRow("creation") << "data/creation.js"; + QTest::newRow("error-creation") << "data/error-creation.js"; // re-uses above DB + QTest::newRow("changeversion") << "data/changeversion.js"; + QTest::newRow("readonly") << "data/readonly.js"; + QTest::newRow("readonly-error") << "data/readonly-error.js"; + QTest::newRow("selection") << "data/selection.js"; + QTest::newRow("selection-bindnames") << "data/selection-bindnames.js"; + QTest::newRow("iteration") << "data/iteration.js"; + QTest::newRow("iteration-forwardonly") << "data/iteration-forwardonly.js"; + QTest::newRow("error-a") << "data/error-a.js"; + QTest::newRow("error-notransaction") << "data/error-notransaction.js"; + QTest::newRow("reopen1") << "data/reopen1.js"; + QTest::newRow("reopen2") << "data/reopen2.js"; // re-uses above DB + + // If you add a test, you should usually use a new database in the + // test - in which case increment total_databases_created_by_tests above. } +/* void tst_sql::validateAgainstWebkit() { // Validates tests against WebKit (HTML5) support. // - QFETCH(QString, jsfile); QFETCH(QString, result); QFETCH(int, databases); - QFETCH(bool, qmlextension); - - if (qmlextension) // WebKit can't do it (yet?) - return; QFile f(jsfile); QVERIFY(f.open(QIODevice::ReadOnly)); @@ -180,14 +178,14 @@ void tst_sql::validateAgainstWebkit() QEXPECT_FAIL("","WebKit doesn't support openDatabaseSync yet", Continue); QCOMPARE(webpage.mainFrame()->evaluateJavaScript(js).toString(),result); - /* + QTest::qWait(100); // WebKit crashes if you quit it too fast QWebSecurityOrigin origin = webpage.mainFrame()->securityOrigin(); QList<QWebDatabase> dbs = origin.databases(); QCOMPARE(dbs.count(), databases); - */ } +*/ void tst_sql::testQml() { @@ -195,8 +193,6 @@ void tst_sql::testQml() // that have been validated against Webkit. // QFETCH(QString, jsfile); - QFETCH(QString, result); - QFETCH(int, databases); QString qml= "import Qt 4.6\n" @@ -206,8 +202,32 @@ void tst_sql::testQml() QmlComponent component(engine, qml.toUtf8(), QUrl::fromLocalFile(SRCDIR "/empty.qml")); // just a file for relative local imports QmlGraphicsText *text = qobject_cast<QmlGraphicsText*>(component.create()); QVERIFY(text != 0); - QCOMPARE(text->text(),result); - QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), databases*2); // *2 = .ini file + .sqlite file + QCOMPARE(text->text(),QString("passed")); +} + +void tst_sql::testQml_cleanopen_data() +{ + QTest::addColumn<QString>("jsfile"); // The input file + QTest::newRow("reopen1") << "data/reopen1.js"; + QTest::newRow("reopen2") << "data/reopen2.js"; + QTest::newRow("error-creation") << "data/error-creation.js"; // re-uses creation DB +} + +void tst_sql::testQml_cleanopen() +{ + // Same as testQml, but clean connections between tests, + // making it more like the tests are running in new processes. + testQml(); + + QmlEnginePrivate::getScriptEngine(engine)->collectGarbage(); // close databases + foreach (QString dbname, QSqlDatabase::connectionNames()) { + QSqlDatabase::removeDatabase(dbname); + } +} + +void tst_sql::totalDatabases() +{ + QCOMPARE(QDir(dbDir()+"/Databases").entryInfoList(QDir::Files|QDir::NoDotAndDotDot).count(), total_databases_created_by_tests*2); } QTEST_MAIN(tst_sql) diff --git a/tests/auto/declarative/states/data/deleting.qml b/tests/auto/declarative/states/data/deleting.qml new file mode 100644 index 0000000..0c512dd --- /dev/null +++ b/tests/auto/declarative/states/data/deleting.qml @@ -0,0 +1,11 @@ +import Qt 4.6 +Rectangle { + id: MyRectangle + width: 100; height: 100 + color: "red" + states: State { + name: "blue" + PropertyChanges { target: MyRectangle; color: "blue"; objectName: "pc1" } + PropertyChanges { target: MyRectangle; radius: 5; objectName: "pc2" } + } +} diff --git a/tests/auto/declarative/states/data/deletingState.qml b/tests/auto/declarative/states/data/deletingState.qml new file mode 100644 index 0000000..9dc46a6 --- /dev/null +++ b/tests/auto/declarative/states/data/deletingState.qml @@ -0,0 +1,13 @@ +import Qt 4.6 +Rectangle { + id: MyRectangle + width: 100; height: 100 + color: "red" + StateGroup { + id: stateGroup + states: State { + name: "blue" + PropertyChanges { target: MyRectangle; color: "blue" } + } + } +} diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp index a4da1f1..4847535 100644 --- a/tests/auto/declarative/states/tst_states.cpp +++ b/tests/auto/declarative/states/tst_states.cpp @@ -44,6 +44,7 @@ #include <private/qmlgraphicsanchors_p_p.h> #include <private/qmlgraphicsrectangle_p.h> #include <private/qmlpropertychanges_p.h> +#include <private/qmlstategroup_p.h> class tst_states : public QObject { @@ -69,6 +70,8 @@ private slots: void explicitChanges(); void propertyErrors(); void incorrectRestoreBug(); + void deletingChange(); + void deletingState(); }; void tst_states::basicChanges() @@ -738,6 +741,68 @@ void tst_states::incorrectRestoreBug() QCOMPARE(rect->color(),QColor("green")); } +void tst_states::deletingChange() +{ + QmlEngine engine; + + QmlComponent rectComponent(&engine, SRCDIR "/data/deleting.qml"); + QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create()); + QVERIFY(rect != 0); + + rect->setState("blue"); + QCOMPARE(rect->color(),QColor("blue")); + QCOMPARE(rect->radius(),qreal(5)); + + rect->setState(""); + QCOMPARE(rect->color(),QColor("red")); + QCOMPARE(rect->radius(),qreal(0)); + + QmlPropertyChanges *pc = rect->findChild<QmlPropertyChanges*>("pc1"); + QVERIFY(pc != 0); + delete pc; + + QmlState *state = rect->findChild<QmlState*>(); + QVERIFY(state != 0); + QCOMPARE(state->changes()->count(), 1); + + rect->setState("blue"); + QCOMPARE(rect->color(),QColor("red")); + QCOMPARE(rect->radius(),qreal(5)); + + delete rect; +} + +void tst_states::deletingState() +{ + QmlEngine engine; + + QmlComponent rectComponent(&engine, SRCDIR "/data/deletingState.qml"); + QmlGraphicsRectangle *rect = qobject_cast<QmlGraphicsRectangle*>(rectComponent.create()); + QVERIFY(rect != 0); + + QmlStateGroup *sg = rect->findChild<QmlStateGroup*>(); + QVERIFY(sg != 0); + QVERIFY(sg->findState("blue") != 0); + + sg->setState("blue"); + QCOMPARE(rect->color(),QColor("blue")); + + sg->setState(""); + QCOMPARE(rect->color(),QColor("red")); + + QmlState *state = rect->findChild<QmlState*>(); + QVERIFY(state != 0); + delete state; + + QVERIFY(sg->findState("blue") == 0); + + //### should we warn that state doesn't exist + sg->setState("blue"); + QCOMPARE(rect->color(),QColor("red")); + + delete rect; +} + QTEST_MAIN(tst_states) #include "tst_states.moc" diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.0.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.0.png Binary files differnew file mode 100644 index 0000000..2b45a06 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.0.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.1.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.1.png Binary files differnew file mode 100644 index 0000000..1f5bae0 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.1.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.2.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.2.png Binary files differnew file mode 100644 index 0000000..cb2b5a4 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.2.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.3.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.3.png Binary files differnew file mode 100644 index 0000000..aa24805 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.3.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.4.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.4.png Binary files differnew file mode 100644 index 0000000..aa24805 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.4.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.qml new file mode 100644 index 0000000..dd7b291 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/echoMode.qml @@ -0,0 +1,1043 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 32 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Key { + type: 6 + key: 16777248 + modifiers: 0 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 48 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 64 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 80 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 96 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 112 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 128 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 144 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 160 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 176 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 192 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 208 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 224 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 240 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 256 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 272 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 288 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 304 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 320 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 336 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 352 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Key { + type: 6 + key: 74 + modifiers: 33554432 + text: "4a" + autorep: false + count: 1 + } + Frame { + msec: 368 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 384 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 400 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 416 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 432 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 7 + key: 74 + modifiers: 33554432 + text: "4a" + autorep: false + count: 1 + } + Frame { + msec: 448 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 464 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 480 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 496 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 512 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 528 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 7 + key: 16777248 + modifiers: 33554432 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 544 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 560 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 576 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 592 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 608 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 624 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 640 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 656 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 672 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 688 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 6 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 704 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 720 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 736 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 752 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 768 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Key { + type: 7 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 784 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 800 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 816 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 832 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 848 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Key { + type: 6 + key: 67 + modifiers: 0 + text: "63" + autorep: false + count: 1 + } + Frame { + msec: 864 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 880 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 896 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Key { + type: 7 + key: 67 + modifiers: 0 + text: "63" + autorep: false + count: 1 + } + Frame { + msec: 912 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 928 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 944 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 960 + image: "echoMode.0.png" + } + Frame { + msec: 976 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Key { + type: 6 + key: 75 + modifiers: 0 + text: "6b" + autorep: false + count: 1 + } + Frame { + msec: 992 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1008 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1024 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1040 + hash: "d072aebc2314a149a856634786b208a0" + } + Key { + type: 7 + key: 75 + modifiers: 0 + text: "6b" + autorep: false + count: 1 + } + Frame { + msec: 1056 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1072 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1088 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1104 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1120 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1136 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1152 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1168 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1184 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1200 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1216 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1232 + hash: "d072aebc2314a149a856634786b208a0" + } + Key { + type: 6 + key: 68 + modifiers: 0 + text: "64" + autorep: false + count: 1 + } + Frame { + msec: 1248 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1264 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1280 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Key { + type: 7 + key: 68 + modifiers: 0 + text: "64" + autorep: false + count: 1 + } + Frame { + msec: 1296 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1312 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1328 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Key { + type: 6 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 1344 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1360 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1376 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1392 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1408 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1424 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1440 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1456 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1472 + hash: "f625a2a82879df96141000e6931d4487" + } + Key { + type: 7 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 1488 + hash: "f625a2a82879df96141000e6931d4487" + } + Key { + type: 6 + key: 87 + modifiers: 0 + text: "77" + autorep: false + count: 1 + } + Frame { + msec: 1504 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1520 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1536 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1552 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Key { + type: 7 + key: 87 + modifiers: 0 + text: "77" + autorep: false + count: 1 + } + Frame { + msec: 1568 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1584 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1600 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1616 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1632 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1648 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Key { + type: 6 + key: 83 + modifiers: 0 + text: "73" + autorep: false + count: 1 + } + Frame { + msec: 1664 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1680 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1696 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1712 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1728 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 6 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 1744 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 7 + key: 83 + modifiers: 0 + text: "73" + autorep: false + count: 1 + } + Frame { + msec: 1760 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1776 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1792 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 7 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 1808 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1824 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1840 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1856 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 6 + key: 76 + modifiers: 0 + text: "6c" + autorep: false + count: 1 + } + Frame { + msec: 1872 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1888 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1904 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1920 + image: "echoMode.1.png" + } + Key { + type: 7 + key: 76 + modifiers: 0 + text: "6c" + autorep: false + count: 1 + } + Frame { + msec: 1936 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1952 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1968 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1984 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 2000 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 2016 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Key { + type: 6 + key: 79 + modifiers: 0 + text: "6f" + autorep: false + count: 1 + } + Frame { + msec: 2032 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Frame { + msec: 2048 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Key { + type: 7 + key: 79 + modifiers: 0 + text: "6f" + autorep: false + count: 1 + } + Frame { + msec: 2064 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Frame { + msec: 2080 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Key { + type: 6 + key: 86 + modifiers: 0 + text: "76" + autorep: false + count: 1 + } + Frame { + msec: 2096 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2112 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2128 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2144 + hash: "c82441813af6ff577687f29f6a09da38" + } + Key { + type: 6 + key: 69 + modifiers: 0 + text: "65" + autorep: false + count: 1 + } + Key { + type: 7 + key: 86 + modifiers: 0 + text: "76" + autorep: false + count: 1 + } + Frame { + msec: 2160 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2176 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2192 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2208 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 6 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 2224 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 7 + key: 69 + modifiers: 0 + text: "65" + autorep: false + count: 1 + } + Frame { + msec: 2240 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2256 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2272 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2288 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2304 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 7 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 2320 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2336 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 6 + key: 77 + modifiers: 0 + text: "6d" + autorep: false + count: 1 + } + Frame { + msec: 2352 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2368 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2384 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2400 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2416 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2432 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Key { + type: 7 + key: 77 + modifiers: 0 + text: "6d" + autorep: false + count: 1 + } + Frame { + msec: 2448 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2464 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2480 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2496 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Key { + type: 6 + key: 89 + modifiers: 0 + text: "79" + autorep: false + count: 1 + } + Frame { + msec: 2512 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2528 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2544 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Key { + type: 7 + key: 89 + modifiers: 0 + text: "79" + autorep: false + count: 1 + } + Frame { + msec: 2560 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2576 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2592 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2608 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2624 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2640 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2656 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2672 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2688 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2704 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2720 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2736 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2752 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2768 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2784 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2800 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2816 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2832 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2848 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2864 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2880 + image: "echoMode.2.png" + } + Frame { + msec: 2896 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2912 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2928 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2944 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2960 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2976 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2992 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3008 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3024 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3040 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3056 + hash: "316f2ba46d059755576e6822dc77afb2" + } +} diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.0.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.0.png Binary files differnew file mode 100644 index 0000000..87c2e07 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.0.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.qml new file mode 100644 index 0000000..e29ac56 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data-X11/hAlign.qml @@ -0,0 +1,107 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 32 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 48 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 64 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 80 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 96 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 112 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 128 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 144 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 160 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 176 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 192 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 208 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 224 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 240 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 256 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 272 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 288 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 304 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 320 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 336 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 352 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 368 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 384 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 400 + hash: "7619ed68aca3544f373777e11a4bfefa" + } +} diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.0.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.0.png Binary files differnew file mode 100644 index 0000000..2b45a06 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.0.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.1.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.1.png Binary files differnew file mode 100644 index 0000000..1f5bae0 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.1.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.2.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.2.png Binary files differnew file mode 100644 index 0000000..cb2b5a4 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.2.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.3.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.3.png Binary files differnew file mode 100644 index 0000000..aa24805 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.3.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.4.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.4.png Binary files differnew file mode 100644 index 0000000..aa24805 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.4.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.qml new file mode 100644 index 0000000..873a86d --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/echoMode.qml @@ -0,0 +1,1043 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 32 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Key { + type: 6 + key: 16777248 + modifiers: 33554432 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 48 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 64 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 80 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 96 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 112 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 128 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 144 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 160 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 176 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 192 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 208 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 224 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 240 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 256 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 272 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 288 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 304 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 320 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 336 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Frame { + msec: 352 + hash: "b73bd9c2fef8812591fff9f43b73da13" + } + Key { + type: 6 + key: 74 + modifiers: 33554432 + text: "4a" + autorep: false + count: 1 + } + Frame { + msec: 368 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 384 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 400 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 416 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 432 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 7 + key: 74 + modifiers: 33554432 + text: "4a" + autorep: false + count: 1 + } + Frame { + msec: 448 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 464 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 480 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 496 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 512 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 528 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 7 + key: 16777248 + modifiers: 0 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 544 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 560 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 576 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 592 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 608 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 624 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 640 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 656 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 672 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Frame { + msec: 688 + hash: "e8b6bdc7d552bb13c5dc2f50b8cf1125" + } + Key { + type: 6 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 704 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 720 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 736 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 752 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 768 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Key { + type: 7 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 784 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 800 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 816 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 832 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Frame { + msec: 848 + hash: "fbc09d695e0b47aae6e977c13f535bfd" + } + Key { + type: 6 + key: 67 + modifiers: 0 + text: "63" + autorep: false + count: 1 + } + Frame { + msec: 864 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 880 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 896 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Key { + type: 7 + key: 67 + modifiers: 0 + text: "63" + autorep: false + count: 1 + } + Frame { + msec: 912 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 928 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 944 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Frame { + msec: 960 + image: "echoMode.0.png" + } + Frame { + msec: 976 + hash: "a4b81c526a5bf8902fde9b8721980977" + } + Key { + type: 6 + key: 75 + modifiers: 0 + text: "6b" + autorep: false + count: 1 + } + Frame { + msec: 992 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1008 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1024 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1040 + hash: "d072aebc2314a149a856634786b208a0" + } + Key { + type: 7 + key: 75 + modifiers: 0 + text: "6b" + autorep: false + count: 1 + } + Frame { + msec: 1056 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1072 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1088 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1104 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1120 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1136 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1152 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1168 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1184 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1200 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1216 + hash: "d072aebc2314a149a856634786b208a0" + } + Frame { + msec: 1232 + hash: "d072aebc2314a149a856634786b208a0" + } + Key { + type: 6 + key: 68 + modifiers: 0 + text: "64" + autorep: false + count: 1 + } + Frame { + msec: 1248 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1264 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1280 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Key { + type: 7 + key: 68 + modifiers: 0 + text: "64" + autorep: false + count: 1 + } + Frame { + msec: 1296 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1312 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Frame { + msec: 1328 + hash: "94defec2865529f185d02cfcbfe166cc" + } + Key { + type: 6 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 1344 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1360 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1376 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1392 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1408 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1424 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1440 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1456 + hash: "f625a2a82879df96141000e6931d4487" + } + Frame { + msec: 1472 + hash: "f625a2a82879df96141000e6931d4487" + } + Key { + type: 7 + key: 65 + modifiers: 0 + text: "61" + autorep: false + count: 1 + } + Frame { + msec: 1488 + hash: "f625a2a82879df96141000e6931d4487" + } + Key { + type: 6 + key: 87 + modifiers: 0 + text: "77" + autorep: false + count: 1 + } + Frame { + msec: 1504 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1520 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1536 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1552 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Key { + type: 7 + key: 87 + modifiers: 0 + text: "77" + autorep: false + count: 1 + } + Frame { + msec: 1568 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1584 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1600 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1616 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1632 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Frame { + msec: 1648 + hash: "1cf29837a4ea63bbb06c15382680d1b6" + } + Key { + type: 6 + key: 83 + modifiers: 0 + text: "73" + autorep: false + count: 1 + } + Frame { + msec: 1664 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1680 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1696 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1712 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1728 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 6 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 1744 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 7 + key: 83 + modifiers: 0 + text: "73" + autorep: false + count: 1 + } + Frame { + msec: 1760 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1776 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1792 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 7 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 1808 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1824 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1840 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Frame { + msec: 1856 + hash: "6eabb6d168ecc9ac604dcf2db0075380" + } + Key { + type: 6 + key: 76 + modifiers: 0 + text: "6c" + autorep: false + count: 1 + } + Frame { + msec: 1872 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1888 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1904 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1920 + image: "echoMode.1.png" + } + Key { + type: 7 + key: 76 + modifiers: 0 + text: "6c" + autorep: false + count: 1 + } + Frame { + msec: 1936 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1952 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1968 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 1984 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 2000 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Frame { + msec: 2016 + hash: "cb2dc1c4fc4e213841b873561f404a4f" + } + Key { + type: 6 + key: 79 + modifiers: 0 + text: "6f" + autorep: false + count: 1 + } + Frame { + msec: 2032 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Frame { + msec: 2048 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Key { + type: 7 + key: 79 + modifiers: 0 + text: "6f" + autorep: false + count: 1 + } + Frame { + msec: 2064 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Frame { + msec: 2080 + hash: "c2aff1ebdee69cca7dc67a102fce5e8e" + } + Key { + type: 6 + key: 86 + modifiers: 0 + text: "76" + autorep: false + count: 1 + } + Frame { + msec: 2096 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2112 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2128 + hash: "c82441813af6ff577687f29f6a09da38" + } + Frame { + msec: 2144 + hash: "c82441813af6ff577687f29f6a09da38" + } + Key { + type: 6 + key: 69 + modifiers: 0 + text: "65" + autorep: false + count: 1 + } + Key { + type: 7 + key: 86 + modifiers: 0 + text: "76" + autorep: false + count: 1 + } + Frame { + msec: 2160 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2176 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2192 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2208 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 6 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 2224 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 7 + key: 69 + modifiers: 0 + text: "65" + autorep: false + count: 1 + } + Frame { + msec: 2240 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2256 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2272 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2288 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2304 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 7 + key: 32 + modifiers: 0 + text: "20" + autorep: false + count: 1 + } + Frame { + msec: 2320 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Frame { + msec: 2336 + hash: "d7da9862980b99e97a1fcd1b5c4c976f" + } + Key { + type: 6 + key: 77 + modifiers: 0 + text: "6d" + autorep: false + count: 1 + } + Frame { + msec: 2352 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2368 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2384 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2400 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2416 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2432 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Key { + type: 7 + key: 77 + modifiers: 0 + text: "6d" + autorep: false + count: 1 + } + Frame { + msec: 2448 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2464 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2480 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Frame { + msec: 2496 + hash: "8f36e26d8685fe55e7a1dd294188f649" + } + Key { + type: 6 + key: 89 + modifiers: 0 + text: "79" + autorep: false + count: 1 + } + Frame { + msec: 2512 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2528 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2544 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Key { + type: 7 + key: 89 + modifiers: 0 + text: "79" + autorep: false + count: 1 + } + Frame { + msec: 2560 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2576 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2592 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2608 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2624 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2640 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2656 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2672 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2688 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2704 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2720 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2736 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2752 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2768 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2784 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2800 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2816 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2832 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2848 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2864 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2880 + image: "echoMode.2.png" + } + Frame { + msec: 2896 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2912 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2928 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2944 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2960 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2976 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 2992 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3008 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3024 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3040 + hash: "316f2ba46d059755576e6822dc77afb2" + } + Frame { + msec: 3056 + hash: "316f2ba46d059755576e6822dc77afb2" + } +} diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.0.png b/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.0.png Binary files differnew file mode 100644 index 0000000..87c2e07 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.0.png diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.qml new file mode 100644 index 0000000..e29ac56 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/data/hAlign.qml @@ -0,0 +1,107 @@ +import Qt.VisualTest 4.6 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 32 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 48 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 64 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 80 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 96 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 112 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 128 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 144 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 160 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 176 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 192 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 208 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 224 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 240 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 256 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 272 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 288 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 304 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 320 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 336 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 352 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 368 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 384 + hash: "7619ed68aca3544f373777e11a4bfefa" + } + Frame { + msec: 400 + hash: "7619ed68aca3544f373777e11a4bfefa" + } +} diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/echoMode.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/echoMode.qml new file mode 100644 index 0000000..b0b50e4 --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/echoMode.qml @@ -0,0 +1,10 @@ +import Qt 4.6 + +Item{ + height: 50; width: 200 + Column{ + //Not an exhaustive echo mode test, that's in QLineEdit (since the functionality is in QLineControl) + TextInput{ id: main; focus: true; echoMode: TextInput.Password } + Text{ text: main.text } + } +} diff --git a/tests/auto/declarative/visual/qmlgraphicstextinput/hAlign.qml b/tests/auto/declarative/visual/qmlgraphicstextinput/hAlign.qml new file mode 100644 index 0000000..2d65adf --- /dev/null +++ b/tests/auto/declarative/visual/qmlgraphicstextinput/hAlign.qml @@ -0,0 +1,39 @@ +import Qt 4.6 + +Item{ + width:600; + height:300; + Column{ + TextInput{ + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignLeft; + } + TextInput{ + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignHCenter; + } + TextInput{ + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignRight; + } + Rectangle{ width: 600; height: 10; color: "pink" } + TextInput{ + height: 30; + width: 600; + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignLeft; + } + TextInput{ + height: 30; + width: 600; + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignHCenter; + } + TextInput{ + height: 30; + width: 600; + text: "Jackdaws love my big sphinx of quartz"; + horizontalAlignment: TextInput.AlignRight; + } + } +} |