summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-08-08 13:26:30 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-08-08 13:26:30 (GMT)
commite28e1f919cdc2b82c45b2a5ceee7a9261e70433d (patch)
tree31e2cf533867b86545b509dd7ee472182a4527f3 /tests
parent74b7d4c2c4036e9f2c0da7f0eaad06cef954b923 (diff)
parent82a18deee74bef3e545bf6426164dbe12548e5d9 (diff)
downloadQt-e28e1f919cdc2b82c45b2a5ceee7a9261e70433d.zip
Qt-e28e1f919cdc2b82c45b2a5ceee7a9261e70433d.tar.gz
Qt-e28e1f919cdc2b82c45b2a5ceee7a9261e70433d.tar.bz2
Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp61
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp370
-rw-r--r--tests/auto/qimagereader/images/test32bfv4.bmpbin0 -> 232874 bytes
-rw-r--r--tests/auto/qimagereader/images/test32v5.bmpbin0 -> 174858 bytes
-rw-r--r--tests/auto/qimagereader/qimagereader.qrc2
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp22
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp51
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp7
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp283
-rw-r--r--tests/auto/qstring/tst_qstring.cpp20
-rw-r--r--tests/auto/qxmlquery/pushBaselines/allAtomics.ref2
-rw-r--r--tests/auto/selftests/expected_printdatatags.txt6
-rw-r--r--tests/auto/selftests/expected_printdatatagswithglobaltags.txt12
-rw-r--r--tests/auto/selftests/printdatatags/printdatatags.pro8
-rw-r--r--tests/auto/selftests/printdatatags/tst_printdatatags.cpp90
-rw-r--r--tests/auto/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro8
-rw-r--r--tests/auto/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp106
-rw-r--r--tests/auto/selftests/selftests.pro3
-rw-r--r--tests/auto/selftests/selftests.qrc2
-rw-r--r--tests/auto/selftests/tst_selftests.cpp14
-rw-r--r--tests/auto/symbols/tst_symbols.cpp8
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/tree.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro5
-rw-r--r--tests/benchmarks/gui/gui.pro5
-rwxr-xr-xtests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro5
-rw-r--r--tests/benchmarks/network/network.pro3
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro5
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro5
-rw-r--r--tests/benchmarks/script/script.pro1
-rw-r--r--tests/system/declarative/sys_calculator/sys_calculator.pro2
-rw-r--r--tests/system/declarative/sys_calculator/sys_calculator.qtt136
-rw-r--r--tests/system/declarative/sys_dial/sys_dial.pro2
-rw-r--r--tests/system/declarative/sys_dial/sys_dial.qtt53
-rw-r--r--tests/system/declarative/sys_flickr/sys_flickr.pro2
-rw-r--r--tests/system/declarative/sys_flickr/sys_flickr.qtt69
-rw-r--r--tests/system/declarative/sys_parallax/sys_parallax.pro2
-rw-r--r--tests/system/declarative/sys_parallax/sys_parallax.qtt59
-rw-r--r--tests/system/declarative/sys_pincharea/sys_pincharea.pro2
-rw-r--r--tests/system/declarative/sys_pincharea/sys_pincharea.qtt78
-rw-r--r--tests/system/declarative/sys_rtl/sys_rtl.pro2
-rw-r--r--tests/system/declarative/sys_rtl/sys_rtl.qtt100
-rw-r--r--tests/system/declarative/sys_samegame/sys_samegame.pro2
-rw-r--r--tests/system/declarative/sys_samegame/sys_samegame.qtt60
-rw-r--r--tests/system/declarative/sys_textedit/sys_textedit.pro2
-rw-r--r--tests/system/declarative/sys_textedit/sys_textedit.qtt116
-rw-r--r--tests/system/declarative/sys_textinput/sys_textinput.pro2
-rw-r--r--tests/system/declarative/sys_textinput/sys_textinput.qtt137
-rw-r--r--tests/system/declarative/sys_twitter/sys_twitter.pro2
-rw-r--r--tests/system/declarative/sys_twitter/sys_twitter.qtt59
-rw-r--r--tests/system/declarative/sys_webbrowser/sys_webbrowser.pro2
-rw-r--r--tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt60
-rw-r--r--tests/system/sys_addressbook/sys_addressbook.pro2
-rw-r--r--tests/system/sys_addressbook/sys_addressbook.qtt69
-rw-r--r--tests/system/sys_analogclock/sys_analogclock.pro2
-rw-r--r--tests/system/sys_analogclock/sys_analogclock.qtt53
-rw-r--r--tests/system/sys_animatedtiles/sys_animatedtiles.pro2
-rw-r--r--tests/system/sys_animatedtiles/sys_animatedtiles.qtt73
-rw-r--r--tests/system/sys_anomaly/sys_anomaly.pro2
-rw-r--r--tests/system/sys_anomaly/sys_anomaly.qtt89
-rw-r--r--tests/system/sys_collidingmice/sys_collidingmice.pro2
-rw-r--r--tests/system/sys_collidingmice/sys_collidingmice.qtt58
-rw-r--r--tests/system/sys_imagegestures/sys_imagegestures.pro2
-rw-r--r--tests/system/sys_imagegestures/sys_imagegestures.qtt57
-rw-r--r--tests/system/sys_masterdetail/sys_masterdetail.pro2
-rw-r--r--tests/system/sys_masterdetail/sys_masterdetail.qtt74
-rw-r--r--tests/system/sys_previewer/sys_previewer.pro2
-rw-r--r--tests/system/sys_previewer/sys_previewer.qtt63
-rw-r--r--tests/system/sys_qftp/sys_qftp.pro2
-rw-r--r--tests/system/sys_qftp/sys_qftp.qtt72
-rw-r--r--tests/system/sys_svgviewer/sys_svgviewer.pro2
-rw-r--r--tests/system/sys_svgviewer/sys_svgviewer.qtt56
-rw-r--r--tests/system/sys_wiggly/sys_wiggly.pro2
-rw-r--r--tests/system/sys_wiggly/sys_wiggly.qtt63
73 files changed, 2768 insertions, 39 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 19b7a76..280f952 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -52,6 +52,8 @@
#include <QInputContext>
#include <private/qapplication_p.h>
+#include "qplatformdefs.h"
+
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
#define SRCDIR "."
@@ -133,6 +135,9 @@ private slots:
void focusOutClearSelection();
void echoMode();
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ void passwordEchoDelay();
+#endif
void geometrySignals();
void testQtQuick11Attributes();
void testQtQuick11Attributes_data();
@@ -2051,6 +2056,62 @@ void tst_qdeclarativetextinput::echoMode()
delete canvas;
}
+
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+void tst_qdeclarativetextinput::passwordEchoDelay()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/echoMode.qml");
+ canvas->show();
+ canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeTextInput *input = qobject_cast<QDeclarativeTextInput *>(qvariant_cast<QObject *>(canvas->rootObject()->property("myInput")));
+
+ QChar fillChar = QLatin1Char('*');
+
+ input->setEchoMode(QDeclarativeTextInput::Password);
+ QCOMPARE(input->displayText(), QString(8, fillChar));
+ input->setText(QString());
+ QCOMPARE(input->displayText(), QString());
+
+ QTest::keyPress(canvas, '0');
+ QTest::keyPress(canvas, '1');
+ QTest::keyPress(canvas, '2');
+ QCOMPARE(input->displayText(), QString(2, fillChar) + QLatin1Char('2'));
+ QTest::keyPress(canvas, '3');
+ QTest::keyPress(canvas, '4');
+ QCOMPARE(input->displayText(), QString(4, fillChar) + QLatin1Char('4'));
+ QTest::keyPress(canvas, Qt::Key_Backspace);
+ QCOMPARE(input->displayText(), QString(4, fillChar));
+ QTest::keyPress(canvas, '4');
+ QCOMPARE(input->displayText(), QString(4, fillChar) + QLatin1Char('4'));
+ QTest::qWait(QT_GUI_PASSWORD_ECHO_DELAY);
+ QTRY_COMPARE(input->displayText(), QString(5, fillChar));
+ QTest::keyPress(canvas, '5');
+ QCOMPARE(input->displayText(), QString(5, fillChar) + QLatin1Char('5'));
+ input->setFocus(false);
+ QVERIFY(!input->hasFocus());
+ QCOMPARE(input->displayText(), QString(6, fillChar));
+ input->setFocus(true);
+ QTRY_VERIFY(input->hasFocus());
+ QCOMPARE(input->displayText(), QString(6, fillChar));
+ QTest::keyPress(canvas, '6');
+ QCOMPARE(input->displayText(), QString(6, fillChar) + QLatin1Char('6'));
+
+ QInputMethodEvent ev;
+ ev.setCommitString(QLatin1String("7"));
+ QApplication::sendEvent(canvas, &ev);
+ QCOMPARE(input->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+
+ delete canvas;
+}
+#endif
+
+
void tst_qdeclarativetextinput::simulateKey(QDeclarativeView *view, int key)
{
QKeyEvent press(QKeyEvent::KeyPress, key, 0);
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index d764187..d452820 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -190,7 +190,8 @@ static int verifyHierarchy(QAccessibleInterface *iface)
if (middleChild) {
entry = if2->navigate(QAccessible::Sibling, middle, &if3);
EXPECT(entry == 0 && if3->object() == middleChild->object());
- delete if3;
+ if (entry == 0)
+ delete if3;
EXPECT(iface->indexOfChild(middleChild) == middle);
}
@@ -270,6 +271,9 @@ private slots:
void scrollAreaTest();
void tableWidgetTest();
void tableViewTest();
+ void table2ListTest();
+ void table2TreeTest();
+ void table2TableTest();
void calendarWidgetTest();
void dockWidgetTest();
void pushButtonTest();
@@ -304,6 +308,10 @@ QString eventName(const int ev)
case 0x0012: return "ScrollingStart";
case 0x0013: return "ScrollingEnd";
case 0x0018: return "MenuCommand";
+
+ case 0x0116: return "TableModelChanged";
+ case 0x011B: return "TextCaretMoved";
+
case 0x8000: return "ObjectCreated";
case 0x8001: return "ObjectDestroyed";
case 0x8002: return "ObjectShow";
@@ -1752,18 +1760,21 @@ void tst_QAccessibility::applicationTest()
void tst_QAccessibility::mainWindowTest()
{
- QMainWindow mw;
- mw.resize(300, 200);
- mw.show(); // triggers layout
+ QMainWindow *mw = new QMainWindow;
+ mw->resize(300, 200);
+ mw->show(); // triggers layout
QLatin1String name = QLatin1String("I am the main window");
- mw.setWindowTitle(name);
- QTest::qWaitForWindowShown(&mw);
+ mw->setWindowTitle(name);
+ QTest::qWaitForWindowShown(mw);
+ QVERIFY_EVENT(mw, 0, QAccessible::ObjectShow);
- QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&mw);
+ QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(mw);
QCOMPARE(interface->text(QAccessible::Name, 0), name);
QCOMPARE(interface->role(0), QAccessible::Window);
delete interface;
+ delete mw;
+ QTestAccessibility::clearEvents();
}
class CounterButton : public QPushButton {
@@ -2749,6 +2760,9 @@ void tst_QAccessibility::textBrowserTest()
void tst_QAccessibility::listViewTest()
{
+#if defined(Q_WS_X11)
+ QSKIP( "Accessible table1 interface is no longer supported on X11.", SkipAll);
+#else
{
QListView listView;
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&listView);
@@ -2814,6 +2828,7 @@ void tst_QAccessibility::listViewTest()
}
QTestAccessibility::clearEvents();
+#endif
}
@@ -3068,9 +3083,11 @@ void tst_QAccessibility::lineEditTest()
le3->deselect();
le3->setCursorPosition(3);
QCOMPARE(textIface->cursorPosition(), 3);
+ QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le3, 0, QAccessible::TextCaretMoved)));
QCOMPARE(textIface->selectionCount(), 0);
- int start, end;
+ QTestAccessibility::clearEvents();
+ int start, end;
QCOMPARE(textIface->text(0, 8), QString::fromLatin1("I always"));
QCOMPARE(textIface->textAtOffset(0, QAccessible2::CharBoundary,&start,&end), QString::fromLatin1("I"));
QCOMPARE(start, 0);
@@ -3113,6 +3130,7 @@ void tst_QAccessibility::lineEditTest()
delete iface;
delete toplevel;
+ QTestAccessibility::clearEvents();
}
void tst_QAccessibility::workspaceTest()
@@ -3523,6 +3541,9 @@ void tst_QAccessibility::scrollAreaTest()
void tst_QAccessibility::tableWidgetTest()
{
+#if defined(Q_WS_X11)
+ QSKIP( "Accessible table1 interface is no longer supported on X11.", SkipAll);
+#else
{
QWidget *topLevel = new QWidget;
QTableWidget *w = new QTableWidget(8,4,topLevel);
@@ -3562,6 +3583,7 @@ void tst_QAccessibility::tableWidgetTest()
delete topLevel;
}
QTestAccessibility::clearEvents();
+#endif
}
class QtTestTableModel: public QAbstractTableModel
@@ -3644,6 +3666,9 @@ public:
void tst_QAccessibility::tableViewTest()
{
+#if defined(Q_WS_X11)
+ QSKIP( "Accessible table1 interface is no longer supported on X11.", SkipAll);
+#else
{
QtTestTableModel *model = new QtTestTableModel(3, 4);
QTableView *w = new QTableView();
@@ -3723,6 +3748,331 @@ void tst_QAccessibility::tableViewTest()
delete model;
}
QTestAccessibility::clearEvents();
+#endif
+}
+
+void tst_QAccessibility::table2ListTest()
+{
+#if !defined(Q_WS_X11)
+ QSKIP( "Accessible table2 interface is currently only supported on X11.", SkipAll);
+#else
+ QListWidget *listView = new QListWidget;
+ listView->addItem("Oslo");
+ listView->addItem("Berlin");
+ listView->addItem("Brisbane");
+ listView->resize(400,400);
+ listView->show();
+ QTest::qWait(1); // Need this for indexOfchild to work.
+#if defined(Q_WS_X11)
+ qt_x11_wait_for_window_manager(listView);
+ QTest::qWait(100);
+#endif
+
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(listView);
+ QCOMPARE(verifyHierarchy(iface), 0);
+
+ QCOMPARE((int)iface->role(0), (int)QAccessible::List);
+ QCOMPARE(iface->childCount(), 3);
+
+ QAccessibleInterface *child1 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 1, &child1), 0);
+ QVERIFY(child1);
+ QCOMPARE(iface->indexOfChild(child1), 1);
+ QCOMPARE(child1->text(QAccessible::Name, 0), QString("Oslo"));
+ QCOMPARE(child1->role(0), QAccessible::ListItem);
+ delete child1;
+
+ QAccessibleInterface *child2 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 2, &child2), 0);
+ QVERIFY(child2);
+ QCOMPARE(iface->indexOfChild(child2), 2);
+ QCOMPARE(child2->text(QAccessible::Name, 0), QString("Berlin"));
+ delete child2;
+
+ QAccessibleInterface *child3 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 3, &child3), 0);
+ QVERIFY(child3);
+ QCOMPARE(iface->indexOfChild(child3), 3);
+ QCOMPARE(child3->text(QAccessible::Name, 0), QString("Brisbane"));
+ delete child3;
+ QTestAccessibility::clearEvents();
+
+ // Check for events
+ QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(1)).center());
+ QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 2, QAccessible::Selection)));
+ QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 2, QAccessible::Focus)));
+ QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(2)).center());
+ QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 3, QAccessible::Selection)));
+ QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 3, QAccessible::Focus)));
+
+ listView->addItem("Munich");
+ QCOMPARE(iface->childCount(), 4);
+
+ // table 2
+ QAccessibleTable2Interface *table2 = iface->table2Interface();
+ QVERIFY(table2);
+ QCOMPARE(table2->columnCount(), 1);
+ QCOMPARE(table2->rowCount(), 4);
+ QAccessibleTable2CellInterface *cell1;
+ QVERIFY(cell1 = table2->cellAt(0,0));
+ QCOMPARE(cell1->text(QAccessible::Name, 0), QString("Oslo"));
+ QAccessibleTable2CellInterface *cell4;
+ QVERIFY(cell4 = table2->cellAt(3,0));
+ QCOMPARE(cell4->text(QAccessible::Name, 0), QString("Munich"));
+ QCOMPARE(cell4->role(0), QAccessible::ListItem);
+ QCOMPARE(cell4->rowIndex(), 3);
+ QCOMPARE(cell4->columnIndex(), 0);
+ QVERIFY(!cell4->isExpandable());
+
+ delete cell4;
+ delete cell1;
+ delete iface;
+ delete listView;
+ QTestAccessibility::clearEvents();
+#endif
+}
+
+void tst_QAccessibility::table2TreeTest()
+{
+#if !defined(Q_WS_X11)
+ QSKIP( "Accessible table2 interface is currently only supported on X11.", SkipAll);
+#else
+ QTreeWidget *treeView = new QTreeWidget;
+ treeView->setColumnCount(2);
+ QTreeWidgetItem *header = new QTreeWidgetItem;
+ header->setText(0, "Artist");
+ header->setText(1, "Work");
+ treeView->setHeaderItem(header);
+
+ QTreeWidgetItem *root1 = new QTreeWidgetItem;
+ root1->setText(0, "Spain");
+ treeView->addTopLevelItem(root1);
+
+ QTreeWidgetItem *item1 = new QTreeWidgetItem;
+ item1->setText(0, "Picasso");
+ item1->setText(1, "Guernica");
+ root1->addChild(item1);
+
+ QTreeWidgetItem *item2 = new QTreeWidgetItem;
+ item2->setText(0, "Tapies");
+ item2->setText(1, "Ambrosia");
+ root1->addChild(item2);
+
+ QTreeWidgetItem *root2 = new QTreeWidgetItem;
+ root2->setText(0, "Austria");
+ treeView->addTopLevelItem(root2);
+
+ QTreeWidgetItem *item3 = new QTreeWidgetItem;
+ item3->setText(0, "Klimt");
+ item3->setText(1, "The Kiss");
+ root2->addChild(item3);
+
+ treeView->resize(400,400);
+ treeView->show();
+ QTest::qWait(1); // Need this for indexOfchild to work.
+#if defined(Q_WS_X11)
+ qt_x11_wait_for_window_manager(treeView);
+ QTest::qWait(100);
+#endif
+
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(treeView);
+ QEXPECT_FAIL("", "Implement Sibling navigation for table2 cells.", Continue);
+ QCOMPARE(verifyHierarchy(iface), 0);
+
+ QCOMPARE((int)iface->role(0), (int)QAccessible::Tree);
+ // header and 2 rows (the others are not expanded, thus not visible)
+ QCOMPARE(iface->childCount(), 6);
+
+ QAccessibleInterface *header1 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 1, &header1), 0);
+ QVERIFY(header1);
+ QCOMPARE(iface->indexOfChild(header1), 1);
+ QCOMPARE(header1->text(QAccessible::Name, 0), QString("Artist"));
+ QCOMPARE(header1->role(0), QAccessible::ColumnHeader);
+ delete header1;
+
+ QAccessibleInterface *child1 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 3, &child1), 0);
+ QVERIFY(child1);
+ QCOMPARE(iface->indexOfChild(child1), 3);
+ QCOMPARE(child1->text(QAccessible::Name, 0), QString("Spain"));
+ QCOMPARE(child1->role(0), QAccessible::TreeItem);
+ QVERIFY(!(child1->state(0) & QAccessible::Expanded));
+ delete child1;
+
+ QAccessibleInterface *child2 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 5, &child2), 0);
+ QVERIFY(child2);
+ QCOMPARE(iface->indexOfChild(child2), 5);
+ QCOMPARE(child2->text(QAccessible::Name, 0), QString("Austria"));
+ delete child2;
+
+ QTestAccessibility::clearEvents();
+
+ // table 2
+ QAccessibleTable2Interface *table2 = iface->table2Interface();
+ QVERIFY(table2);
+ QCOMPARE(table2->columnCount(), 2);
+ QCOMPARE(table2->rowCount(), 2);
+ QAccessibleTable2CellInterface *cell1;
+ QVERIFY(cell1 = table2->cellAt(0,0));
+ QCOMPARE(cell1->text(QAccessible::Name, 0), QString("Spain"));
+ QAccessibleTable2CellInterface *cell2;
+ QVERIFY(cell2 = table2->cellAt(1,0));
+ QCOMPARE(cell2->text(QAccessible::Name, 0), QString("Austria"));
+ QCOMPARE(cell2->role(0), QAccessible::TreeItem);
+ QCOMPARE(cell2->rowIndex(), 1);
+ QCOMPARE(cell2->columnIndex(), 0);
+ QVERIFY(cell2->isExpandable());
+ QCOMPARE(iface->indexOfChild(cell2), 5);
+ QVERIFY(!(cell2->state(0) & QAccessible::Expanded));
+ QCOMPARE(table2->columnDescription(1), QString("Work"));
+ delete cell2;
+ delete cell1;
+
+ treeView->expandAll();
+
+ QTest::qWait(1); // Need this for indexOfchild to work.
+#if defined(Q_WS_X11)
+ qt_x11_wait_for_window_manager(treeView);
+ QTest::qWait(100);
+#endif
+
+ QCOMPARE(table2->columnCount(), 2);
+ QCOMPARE(table2->rowCount(), 5);
+ cell1 = table2->cellAt(1,0);
+ QCOMPARE(cell1->text(QAccessible::Name, 0), QString("Picasso"));
+ QCOMPARE(iface->indexOfChild(cell1), 5); // 1 based + 2 header + 2 for root item
+
+ cell2 = table2->cellAt(4,0);
+ QCOMPARE(cell2->text(QAccessible::Name, 0), QString("Klimt"));
+ QCOMPARE(cell2->role(0), QAccessible::TreeItem);
+ QCOMPARE(cell2->rowIndex(), 4);
+ QCOMPARE(cell2->columnIndex(), 0);
+ QVERIFY(!cell2->isExpandable());
+ QCOMPARE(iface->indexOfChild(cell2), 11);
+
+ QCOMPARE(table2->columnDescription(0), QString("Artist"));
+ QCOMPARE(table2->columnDescription(1), QString("Work"));
+
+ delete iface;
+ QTestAccessibility::clearEvents();
+#endif
+}
+
+
+void tst_QAccessibility::table2TableTest()
+{
+#if !defined(Q_WS_X11)
+ QSKIP( "Accessible table2 interface is currently only supported on X11.", SkipAll);
+#else
+ QTableWidget *tableView = new QTableWidget(3, 3);
+ tableView->setColumnCount(3);
+ QStringList hHeader;
+ hHeader << "h1" << "h2" << "h3";
+ tableView->setHorizontalHeaderLabels(hHeader);
+
+ QStringList vHeader;
+ vHeader << "v1" << "v2" << "v3";
+ tableView->setVerticalHeaderLabels(vHeader);
+
+ for (int i = 0; i<9; ++i) {
+ QTableWidgetItem *item = new QTableWidgetItem;
+ item->setText(QString::number(i/3) + QString(".") + QString::number(i%3));
+ tableView->setItem(i/3, i%3, item);
+ }
+
+ tableView->resize(600,600);
+ tableView->show();
+ QTest::qWait(1); // Need this for indexOfchild to work.
+#if defined(Q_WS_X11)
+ qt_x11_wait_for_window_manager(tableView);
+ QTest::qWait(100);
+#endif
+
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(tableView);
+ QEXPECT_FAIL("", "Implement Sibling navigation for table2 cells.", Continue);
+ QCOMPARE(verifyHierarchy(iface), 0);
+
+ QCOMPARE((int)iface->role(0), (int)QAccessible::Table);
+ // header and 2 rows (the others are not expanded, thus not visible)
+ QCOMPARE(iface->childCount(), 9+3+3+1); // cell+headers+topleft button
+
+ QAccessibleInterface *cornerButton = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 1, &cornerButton), 0);
+ QVERIFY(cornerButton);
+ QCOMPARE(iface->indexOfChild(cornerButton), 1);
+ QCOMPARE(cornerButton->role(0), QAccessible::Pane);
+ delete cornerButton;
+
+ QAccessibleInterface *child1 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 3, &child1), 0);
+ QVERIFY(child1);
+ QCOMPARE(iface->indexOfChild(child1), 3);
+ QCOMPARE(child1->text(QAccessible::Name, 0), QString("h2"));
+ QCOMPARE(child1->role(0), QAccessible::ColumnHeader);
+ QVERIFY(!(child1->state(0) & QAccessible::Expanded));
+ delete child1;
+
+ QAccessibleInterface *child2 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 11, &child2), 0);
+ QVERIFY(child2);
+ QCOMPARE(iface->indexOfChild(child2), 11);
+ QCOMPARE(child2->text(QAccessible::Name, 0), QString("1.1"));
+ QAccessibleTable2CellInterface *cell2Iface = static_cast<QAccessibleTable2CellInterface*>(child2);
+ QCOMPARE(cell2Iface->rowIndex(), 1);
+ QCOMPARE(cell2Iface->columnIndex(), 1);
+ delete child2;
+
+ QAccessibleInterface *child3 = 0;
+ QCOMPARE(iface->navigate(QAccessible::Child, 12, &child3), 0);
+ QCOMPARE(iface->indexOfChild(child3), 12);
+ QCOMPARE(child3->text(QAccessible::Name, 0), QString("1.2"));
+ delete child3;
+
+ QTestAccessibility::clearEvents();
+
+ // table 2
+ QAccessibleTable2Interface *table2 = iface->table2Interface();
+ QVERIFY(table2);
+ QCOMPARE(table2->columnCount(), 3);
+ QCOMPARE(table2->rowCount(), 3);
+ QAccessibleTable2CellInterface *cell1;
+ QVERIFY(cell1 = table2->cellAt(0,0));
+ QCOMPARE(cell1->text(QAccessible::Name, 0), QString("0.0"));
+ QCOMPARE(iface->indexOfChild(cell1), 6);
+
+ QAccessibleTable2CellInterface *cell2;
+ QVERIFY(cell2 = table2->cellAt(0,1));
+ QCOMPARE(cell2->text(QAccessible::Name, 0), QString("0.1"));
+ QCOMPARE(cell2->role(0), QAccessible::Cell);
+ QCOMPARE(cell2->rowIndex(), 0);
+ QCOMPARE(cell2->columnIndex(), 1);
+ QCOMPARE(iface->indexOfChild(cell2), 7);
+ delete cell2;
+
+ QAccessibleTable2CellInterface *cell3;
+ QVERIFY(cell3 = table2->cellAt(1,2));
+ QCOMPARE(cell3->text(QAccessible::Name, 0), QString("1.2"));
+ QCOMPARE(cell3->role(0), QAccessible::Cell);
+ QCOMPARE(cell3->rowIndex(), 1);
+ QCOMPARE(cell3->columnIndex(), 2);
+ QCOMPARE(iface->indexOfChild(cell3), 12);
+ delete cell3;
+
+ QCOMPARE(table2->columnDescription(0), QString("h1"));
+ QCOMPARE(table2->columnDescription(1), QString("h2"));
+ QCOMPARE(table2->columnDescription(2), QString("h3"));
+ QCOMPARE(table2->rowDescription(0), QString("v1"));
+ QCOMPARE(table2->rowDescription(1), QString("v2"));
+ QCOMPARE(table2->rowDescription(2), QString("v3"));
+
+ delete iface;
+
+ delete tableView;
+
+ QTestAccessibility::clearEvents();
+#endif
}
void tst_QAccessibility::calendarWidgetTest()
@@ -3980,6 +4330,9 @@ void tst_QAccessibility::comboBoxTest()
void tst_QAccessibility::treeWidgetTest()
{
+#if defined(Q_WS_X11)
+ QSKIP( "Accessible table1 interface is no longer supported on X11.", SkipAll);
+#else
QWidget *w = new QWidget;
QTreeWidget *tree = new QTreeWidget(w);
QHBoxLayout *l = new QHBoxLayout(w);
@@ -4037,6 +4390,7 @@ void tst_QAccessibility::treeWidgetTest()
delete w;
QTestAccessibility::clearEvents();
+#endif
}
void tst_QAccessibility::labelTest()
diff --git a/tests/auto/qimagereader/images/test32bfv4.bmp b/tests/auto/qimagereader/images/test32bfv4.bmp
new file mode 100644
index 0000000..3706037
--- /dev/null
+++ b/tests/auto/qimagereader/images/test32bfv4.bmp
Binary files differ
diff --git a/tests/auto/qimagereader/images/test32v5.bmp b/tests/auto/qimagereader/images/test32v5.bmp
new file mode 100644
index 0000000..8ad3cfa
--- /dev/null
+++ b/tests/auto/qimagereader/images/test32v5.bmp
Binary files differ
diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc
index 632b73a..2c70652 100644
--- a/tests/auto/qimagereader/qimagereader.qrc
+++ b/tests/auto/qimagereader/qimagereader.qrc
@@ -42,6 +42,8 @@
<file>images/teapot.ppm</file>
<file>images/test.ppm</file>
<file>images/test.xpm</file>
+ <file>images/test32bfv4.bmp</file>
+ <file>images/test32v5.bmp</file>
<file>images/tst7.bmp</file>
<file>images/tst7.png</file>
<file>images/transparent.xpm</file>
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 5c65cb3..5d958d7 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -234,6 +234,8 @@ void tst_QImageReader::readImage_data()
QTest::newRow("empty") << QString() << false << QByteArray();
QTest::newRow("BMP: colorful") << QString("colorful.bmp") << true << QByteArray("bmp");
+ QTest::newRow("BMP: test32bfv4") << QString("test32bfv4.bmp") << true << QByteArray("bmp");
+ QTest::newRow("BMP: test32v5") << QString("test32v5.bmp") << true << QByteArray("bmp");
QTest::newRow("BMP: font") << QString("font.bmp") << true << QByteArray("bmp");
QTest::newRow("BMP: signed char") << QString("crash-signed-char.bmp") << true << QByteArray("bmp");
QTest::newRow("BMP: 4bpp RLE") << QString("4bpp-rle.bmp") << true << QByteArray("bmp");
@@ -432,6 +434,8 @@ void tst_QImageReader::setClipRect_data()
QTest::addColumn<QRect>("newRect");
QTest::addColumn<QByteArray>("format");
QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: test32bfv4") << "test32bfv4" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: test32v5") << "test32v5" << QRect(0, 0, 50, 50) << QByteArray("bmp");
QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
QTest::newRow("BMP: 4bpp uncompressed") << "tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp");
QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
@@ -484,6 +488,8 @@ void tst_QImageReader::setScaledClipRect_data()
QTest::addColumn<QByteArray>("format");
QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: test32bfv4") << "test32bfv4" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: test32v5") << "test32v5" << QRect(0, 0, 50, 50) << QByteArray("bmp");
QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png");
@@ -555,6 +561,8 @@ void tst_QImageReader::imageFormat_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8;
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
+ QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng") << QImage::Format_Invalid;
@@ -684,6 +692,8 @@ void tst_QImageReader::supportsAnimation_data()
QTest::newRow("BMP: colorful") << QString("colorful.bmp") << false;
QTest::newRow("BMP: font") << QString("font.bmp") << false;
QTest::newRow("BMP: signed char") << QString("crash-signed-char.bmp") << false;
+ QTest::newRow("BMP: test32bfv4") << QString("test32bfv4.bmp") << false;;
+ QTest::newRow("BMP: test32v5") << QString("test32v5.bmp") << false;
QTest::newRow("XPM: marble") << QString("marble.xpm") << false;
QTest::newRow("PNG: kollada") << QString("kollada.png") << false;
QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false;
@@ -1064,6 +1074,8 @@ void tst_QImageReader::readFromDevice_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp");
QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
#ifdef QTEST_HAVE_MNG
QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng");
@@ -1155,6 +1167,8 @@ void tst_QImageReader::readFromFileAfterJunk_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp");
QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
// QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng");
// QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng");
@@ -1233,6 +1247,8 @@ void tst_QImageReader::devicePosition_data()
QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-3") << QString("test32bfv4.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp");
QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
// QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng");
// QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng");
@@ -1305,6 +1321,12 @@ void tst_QImageReader::readFromResources_data()
QTest::newRow("4bpp-rle.bmp") << QString("4bpp-rle.bmp")
<< QByteArray("bmp") << QSize(640, 480)
<< QString("");
+ QTest::newRow("test32bfv4.bmp") << QString("test32bfv4.bmp")
+ << QByteArray("bmp") << QSize(373, 156)
+ << QString("");
+ QTest::newRow("test32v5.bmp") << QString("test32v5.bmp")
+ << QByteArray("bmp") << QSize(373, 156)
+ << QString("");
#ifdef QTEST_HAVE_GIF
QTest::newRow("corrupt.gif") << QString("corrupt.gif")
<< QByteArray("gif") << QSize(0, 0)
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index f0f1685..6abbdcd 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -72,6 +72,8 @@
#include "qcommonstyle.h"
#include "qstyleoption.h"
+#include "qplatformdefs.h"
+
QT_BEGIN_NAMESPACE
class QPainter;
QT_END_NAMESPACE
@@ -180,6 +182,10 @@ private slots:
void echoMode();
void passwordEchoOnEdit();
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+ void passwordEchoDelay();
+#endif
+
void maxLength_mask_data();
void maxLength_mask();
@@ -1724,6 +1730,51 @@ void tst_QLineEdit::passwordEchoOnEdit()
testWidget->setEchoMode(QLineEdit::Normal);
}
+#ifdef QT_GUI_PASSWORD_ECHO_DELAY
+void tst_QLineEdit::passwordEchoDelay()
+{
+ QStyleOptionFrameV2 opt;
+ QChar fillChar = testWidget->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, testWidget);
+
+ testWidget->setEchoMode(QLineEdit::Password);
+ testWidget->setFocus();
+ testWidget->raise();
+ QTRY_VERIFY(testWidget->hasFocus());
+
+ QTest::keyPress(testWidget, '0');
+ QTest::keyPress(testWidget, '1');
+ QTest::keyPress(testWidget, '2');
+ QCOMPARE(testWidget->displayText(), QString(2, fillChar) + QLatin1Char('2'));
+ QTest::keyPress(testWidget, '3');
+ QTest::keyPress(testWidget, '4');
+ QCOMPARE(testWidget->displayText(), QString(4, fillChar) + QLatin1Char('4'));
+ QTest::keyPress(testWidget, Qt::Key_Backspace);
+ QCOMPARE(testWidget->displayText(), QString(4, fillChar));
+ QTest::keyPress(testWidget, '4');
+ QCOMPARE(testWidget->displayText(), QString(4, fillChar) + QLatin1Char('4'));
+ QTest::qWait(QT_GUI_PASSWORD_ECHO_DELAY);
+ QTRY_COMPARE(testWidget->displayText(), QString(5, fillChar));
+ QTest::keyPress(testWidget, '5');
+ QCOMPARE(testWidget->displayText(), QString(5, fillChar) + QLatin1Char('5'));
+ testWidget->clearFocus();
+ QVERIFY(!testWidget->hasFocus());
+ QCOMPARE(testWidget->displayText(), QString(6, fillChar));
+ testWidget->setFocus();
+ QTRY_VERIFY(testWidget->hasFocus());
+ QCOMPARE(testWidget->displayText(), QString(6, fillChar));
+ QTest::keyPress(testWidget, '6');
+ QCOMPARE(testWidget->displayText(), QString(6, fillChar) + QLatin1Char('6'));
+
+ QInputMethodEvent ev;
+ ev.setCommitString(QLatin1String("7"));
+ QApplication::sendEvent(testWidget, &ev);
+ QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+
+ // restore clean state
+ testWidget->setEchoMode(QLineEdit::Normal);
+}
+#endif
+
void tst_QLineEdit::maxLength_mask_data()
{
QTest::addColumn<QString>("mask");
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index f56176a..70287a9 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -1672,10 +1672,8 @@ void tst_QNetworkReply::getErrors()
QFETCH(QString, url);
QNetworkRequest request(url);
-#if defined(Q_OS_WIN) || defined (Q_OS_SYMBIAN)
if (qstrcmp(QTest::currentDataTag(), "empty-scheme-host") == 0 && QFileInfo(url).isAbsolute())
QTest::ignoreMessage(QtWarningMsg, "QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files");
-#endif
QNetworkReplyPtr reply = manager.get(request);
reply->setParent(this); // we have expect-fails
@@ -1691,10 +1689,9 @@ void tst_QNetworkReply::getErrors()
//qDebug() << reply->errorString();
QFETCH(int, error);
-#if defined(Q_OS_WIN) || defined (Q_OS_SYMBIAN)
if (QFileInfo(url).isAbsolute())
- QEXPECT_FAIL("empty-scheme-host", "this is expected to fail on Windows and Symbian, QTBUG-17731", Abort);
-#endif
+ QEXPECT_FAIL("empty-scheme-host", "this is expected to fail, QTBUG-17731", Abort);
+
QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort);
// the line below is not necessary
QEXPECT_FAIL("ftp-dir-not-readable", "QFtp cannot provide enough detail", Abort);
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index edc81bc..5f1a621 100644
--- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -92,6 +92,7 @@ private slots:
void escapedTableName();
void whiteSpaceInIdentifiers();
void psqlSchemaTest();
+ void selectAfterUpdate();
private:
void dropTestTables( QSqlDatabase db );
@@ -118,6 +119,8 @@ void tst_QSqlRelationalTableModel::recreateTestTables(QSqlDatabase db)
QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(2, 'trond', 2, 1)"));
QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(3, 'vohi', 1, 2)"));
QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(4, 'boris', 2, 2)"));
+ QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(5, 'nat', NULL, NULL)"));
+ QVERIFY_SQL( q, exec("insert into " + reltest1 + " values(6, 'ale', NULL, 2)"));
QVERIFY_SQL( q, exec("create table " + reltest2 + " (tid int not null primary key, title varchar(20))"));
QVERIFY_SQL( q, exec("insert into " + reltest2 + " values(1, 'herr')"));
@@ -221,6 +224,16 @@ void tst_QSqlRelationalTableModel::data()
//try a non-existent index
QVERIFY2(model.data(model.index(0,4)).isValid() == false,"Invalid index returned valid QVariant");
+ // check row with null relation: they are reported only in LeftJoin mode
+ QCOMPARE(model.rowCount(), 4);
+
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(4, 0)).toInt(), 5);
+ QCOMPARE(model.data(model.index(4, 1)).toString(), QString("nat"));
+ QVERIFY2(model.data(model.index(4, 2)).isValid() == true, "NULL relation reported with invalid QVariant");
+
//check data retrieval when relational key is a non-integer type
//in this case a string
QSqlRelationalTableModel model2(0,db);
@@ -379,6 +392,24 @@ void tst_QSqlRelationalTableModel::setData()
QCOMPARE(model.data(model.index(0,1)).toString(), QString("Mr"));
}
+ // Redo same tests, with a LeftJoin
+ {
+ QSqlRelationalTableModel model(0, db);
+
+ model.setTable(reltest2);
+ model.setRelation(1, QSqlRelation(reltest5, "title", "abbrev"));
+ model.setEditStrategy(QSqlTableModel::OnManualSubmit);
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0,1)).toString(), QString("Mr"));
+ QVERIFY(model.setData(model.index(0,1), QString("herr")));
+ QCOMPARE(model.data(model.index(0,1)).toString(), QString("Hr"));
+ QVERIFY_SQL(model, submitAll());
+
+ QCOMPARE(model.data(model.index(0,1)).toString(), QString("Hr"));
+ }
+
}
void tst_QSqlRelationalTableModel::multipleRelation()
@@ -402,6 +433,21 @@ void tst_QSqlRelationalTableModel::multipleRelation()
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
QCOMPARE(model.data(model.index(0, 3)).toString(), QString("Trondheim"));
+
+ // Redo same test in the LeftJoin mode
+ model.setTable(reltest1);
+ model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setRelation(3, QSqlRelation(reltest4, "id", "name"));
+ model.setSort(0, Qt::AscendingOrder);
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(2, 0)).toInt(), 3);
+
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+ QCOMPARE(model.data(model.index(0, 3)).toString(), QString("Trondheim"));
}
void tst_QSqlRelationalTableModel::insertRecord()
@@ -423,7 +469,7 @@ void tst_QSqlRelationalTableModel::insertRecord()
QSqlField f3("title_key", QVariant::Int);
QSqlField f4("another_title_key", QVariant::Int);
- f1.setValue(5);
+ f1.setValue(7);
f2.setValue("test");
f3.setValue(1);
f4.setValue(2);
@@ -440,9 +486,17 @@ void tst_QSqlRelationalTableModel::insertRecord()
QVERIFY_SQL(model, insertRecord(-1, rec));
- QCOMPARE(model.data(model.index(4, 0)).toInt(), 5);
+ QCOMPARE(model.data(model.index(4, 0)).toInt(), 7);
QCOMPARE(model.data(model.index(4, 1)).toString(), QString("test"));
QCOMPARE(model.data(model.index(4, 2)).toString(), QString("herr"));
+
+ // In LeftJoin mode, two additional rows are fetched
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(6, 0)).toInt(), 7);
+ QCOMPARE(model.data(model.index(6, 1)).toString(), QString("test"));
+ QCOMPARE(model.data(model.index(6, 2)).toString(), QString("herr"));
}
void tst_QSqlRelationalTableModel::setRecord()
@@ -465,7 +519,7 @@ void tst_QSqlRelationalTableModel::setRecord()
QSqlField f3("title_key", QVariant::Int);
QSqlField f4("another_title_key", QVariant::Int);
- f1.setValue(5);
+ f1.setValue(7);
f2.setValue("tester");
f3.setValue(1);
f4.setValue(2);
@@ -486,14 +540,14 @@ void tst_QSqlRelationalTableModel::setRecord()
QVERIFY_SQL(model, setRecord(1, rec));
- QCOMPARE(model.data(model.index(1, 0)).toInt(), 5);
+ QCOMPARE(model.data(model.index(1, 0)).toInt(), 7);
QCOMPARE(model.data(model.index(1, 1)).toString(), QString("tester"));
QCOMPARE(model.data(model.index(1, 2)).toString(), QString("herr"));
model.setSort(0, Qt::AscendingOrder);
QVERIFY_SQL(model, submit());
- QCOMPARE(model.data(model.index(3, 0)).toInt(), 5);
+ QCOMPARE(model.data(model.index(3, 0)).toInt(), 7);
QCOMPARE(model.data(model.index(3, 1)).toString(), QString("tester"));
QCOMPARE(model.data(model.index(3, 2)).toString(), QString("herr"));
@@ -633,6 +687,32 @@ void tst_QSqlRelationalTableModel::removeColumn()
QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
QCOMPARE(model.data(model.index(0, 1)), QVariant());
+ // try in LeftJoin mode the same tests
+ CHECK_DATABASE(db);
+ recreateTestTables(db);
+
+ QSqlRelationalTableModel lmodel(0, db);
+
+ lmodel.setTable(reltest1);
+ lmodel.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ lmodel.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(lmodel, select());
+
+ QVERIFY_SQL(lmodel, removeColumn(3));
+ QVERIFY_SQL(lmodel, select());
+
+ QCOMPARE(lmodel.columnCount(), 3);
+
+ QCOMPARE(lmodel.data(lmodel.index(0, 0)).toInt(), 1);
+ QCOMPARE(lmodel.data(lmodel.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(lmodel.data(lmodel.index(0, 2)).toString(), QString("herr"));
+ QCOMPARE(lmodel.data(lmodel.index(0, 3)), QVariant());
+
+ // try removing more than one column
+ QVERIFY_SQL(lmodel, removeColumns(1, 2));
+ QCOMPARE(lmodel.columnCount(), 1);
+ QCOMPARE(lmodel.data(lmodel.index(0, 0)).toInt(), 1);
+ QCOMPARE(lmodel.data(lmodel.index(0, 1)), QVariant());
}
void tst_QSqlRelationalTableModel::filter()
@@ -652,6 +732,14 @@ void tst_QSqlRelationalTableModel::filter()
QCOMPARE(model.rowCount(), 2);
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
QCOMPARE(model.data(model.index(1, 2)).toString(), QString("herr"));
+
+ // Redo same filter test in LeftJoin mode
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model,select());
+
+ QCOMPARE(model.rowCount(), 2);
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+ QCOMPARE(model.data(model.index(1, 2)).toString(), QString("herr"));
}
void tst_QSqlRelationalTableModel::sort()
@@ -693,6 +781,36 @@ void tst_QSqlRelationalTableModel::sort()
QCOMPARE(model.data(model.index(3, 3)).toInt(), 2);
}
+ // redo same test in LeftJoin mode
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ model.setSort(2, Qt::DescendingOrder);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.rowCount(), 6);
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(1, 2)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(2, 2)).toString(), QString("herr"));
+ QCOMPARE(model.data(model.index(3, 2)).toString(), QString("herr"));
+ QCOMPARE(model.data(model.index(4, 2)).toString(), QString(""));
+ QCOMPARE(model.data(model.index(5, 2)).toString(), QString(""));
+
+ model.setSort(3, Qt::AscendingOrder);
+ QVERIFY_SQL(model, select());
+
+ if (!db.driverName().startsWith("QTDS")) {
+ QCOMPARE(model.rowCount(), 6);
+ QCOMPARE(model.data(model.index(0, 3)).toString(), QString(""));
+ QCOMPARE(model.data(model.index(1, 3)).toString(), QString("herr"));
+ QCOMPARE(model.data(model.index(2, 3)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(3, 3)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(4, 3)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(5, 3)).toString(), QString("mister"));
+ } else {
+ QCOMPARE(model.data(model.index(0, 3)).toInt(), 1);
+ QCOMPARE(model.data(model.index(1, 3)).toInt(), 2);
+ QCOMPARE(model.data(model.index(2, 3)).toInt(), 2);
+ QCOMPARE(model.data(model.index(3, 3)).toInt(), 2);
+ }
}
static void testRevert(QSqlRelationalTableModel &model)
@@ -773,7 +891,18 @@ void tst_QSqlRelationalTableModel::revert()
if (QTest::currentTestFailed())
return;
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+ testRevert(model);
+
/* and again with OnManualSubmit */
+ model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
+ QVERIFY_SQL(model, select());
+ model.setEditStrategy(QSqlTableModel::OnManualSubmit);
+ testRevert(model);
+
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
model.setEditStrategy(QSqlTableModel::OnManualSubmit);
testRevert(model);
}
@@ -805,13 +934,13 @@ void tst_QSqlRelationalTableModel::clearDisplayValuesCache()
QCOMPARE(model.data(model.index(3, 3)).toInt(), 2 );
model.insertRow(model.rowCount());
- QVERIFY(model.setData(model.index(4, 0), 5, Qt::EditRole));
+ QVERIFY(model.setData(model.index(4, 0), 7, Qt::EditRole));
QVERIFY(model.setData(model.index(4, 1), "anders", Qt::EditRole));
QVERIFY(model.setData(model.index(4, 2), 1, Qt::EditRole));
QVERIFY(model.setData(model.index(4, 3), 1, Qt::EditRole));
model.submitAll();
- QCOMPARE(model.data(model.index(0, 0)).toInt(), 5);
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 7);
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("anders"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
if (!db.driverName().startsWith("QTDS"))
@@ -896,6 +1025,17 @@ void tst_QSqlRelationalTableModel::invalidData()
//try to set data in non valid index
QVERIFY(model.setData(model.index(0,10),5) == false);
+
+ //same test with LeftJoin mode
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ //try set a non-existent relational key
+ QVERIFY(model.setData(model.index(0, 2), 3) == false);
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+
+ //try to set data in non valid index
+ QVERIFY(model.setData(model.index(0,10),5) == false);
}
void tst_QSqlRelationalTableModel::relationModel()
@@ -926,6 +1066,19 @@ void tst_QSqlRelationalTableModel::relationModel()
QSqlTableModel *rel_model = model.relationModel(2);
QCOMPARE(rel_model->data(rel_model->index(0,1)).toString(), QString("herr"));
+
+ //same test in JoinMode
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QVERIFY(model.relationModel(0) == NULL);
+ QVERIFY(model.relationModel(1) == NULL);
+ QVERIFY(model.relationModel(2) != NULL);
+ QVERIFY(model.relationModel(3) != NULL);
+ QVERIFY(model.relationModel(4) == NULL);
+
+ QSqlTableModel *rel_model2 = model.relationModel(2);
+ QCOMPARE(rel_model2->data(rel_model->index(0,1)).toString(), QString("herr"));
}
void tst_QSqlRelationalTableModel::casing()
@@ -1021,7 +1174,15 @@ void tst_QSqlRelationalTableModel::escapedRelations()
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+
//try with index column quoted
+ model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
if (db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) {
model.setRelation(2, QSqlRelation(reltest2,
db.driver()->escapeIdentifier("tid", QSqlDriver::FieldName).toUpper(),
@@ -1037,8 +1198,15 @@ void tst_QSqlRelationalTableModel::escapedRelations()
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
- //try with display column quoted
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+
+ //try with display column quoted
+ model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
if (db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) {
model.setRelation(2, QSqlRelation(reltest2,
@@ -1056,8 +1224,15 @@ void tst_QSqlRelationalTableModel::escapedRelations()
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
- //try with tablename and index and display columns quoted in the relation
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+ //try with tablename and index and display columns quoted in the relation
+ model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
if (db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) {
model.setRelation(2, QSqlRelation(reltest2,
"tid",
@@ -1072,6 +1247,13 @@ void tst_QSqlRelationalTableModel::escapedRelations()
QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
+
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
}
void tst_QSqlRelationalTableModel::escapedTableName()
@@ -1126,6 +1308,55 @@ void tst_QSqlRelationalTableModel::escapedTableName()
QCOMPARE(model.data(model.index(3,2)).toString(), QString("herr"));
}
+
+ //ok, now do same test with LeftJoin
+ {
+ QSqlRelationalTableModel model(0, db);
+
+ if (db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) {
+ model.setTable(db.driver()->escapeIdentifier(reltest1.toUpper(), QSqlDriver::TableName));
+ } else {
+ model.setTable(db.driver()->escapeIdentifier(reltest1, QSqlDriver::TableName));
+ }
+ model.setSort(0, Qt::AscendingOrder);
+ model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QVERIFY(model.setData(model.index(0, 1), QString("harry2")));
+ QVERIFY(model.setData(model.index(0, 2), 2));
+
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry2"));
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
+
+ model.submit();
+
+ QVERIFY(model.setData(model.index(3,1), QString("boris2")));
+ QVERIFY(model.setData(model.index(3, 2), 1));
+
+ QCOMPARE(model.data(model.index(3,1)).toString(), QString("boris2"));
+ QCOMPARE(model.data(model.index(3, 2)).toString(), QString("herr"));
+
+ model.submit();
+ }
+ { //verify values
+ QSqlRelationalTableModel model(0, db);
+ model.setTable(reltest1);
+ model.setSort(0, Qt::AscendingOrder);
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry2"));
+ QCOMPARE(model.data(model.index(0, 2)).toInt(), 2);
+ QCOMPARE(model.data(model.index(3, 1)).toString(), QString("boris2"));
+ QCOMPARE(model.data(model.index(3, 2)).toInt(), 1);
+
+ model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ QVERIFY_SQL(model, select());
+ QCOMPARE(model.data(model.index(0, 2)).toString(), QString("mister"));
+ QCOMPARE(model.data(model.index(3,2)).toString(), QString("herr"));
+
+ }
}
void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers()
@@ -1147,6 +1378,15 @@ void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers()
QCOMPARE(model.data(model.index(0,1)).toString(), QString("Washington"));
QCOMPARE(model.data(model.index(1,1)).toString(), QString("New York"));
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+
+ QCOMPARE(model.data(model.index(0,1)).toString(), QString("Washington"));
+ QCOMPARE(model.data(model.index(1,1)).toString(), QString("New York"));
+
+ model.setJoinMode(QSqlRelationalTableModel::InnerJoin);
+ QVERIFY_SQL(model, select());
+
QSqlRecord rec;
QSqlField f1("id", QVariant::Int);
QSqlField f2(db.driver()->escapeIdentifier("city key", QSqlDriver::FieldName), QVariant::Int);
@@ -1223,6 +1463,31 @@ void tst_QSqlRelationalTableModel::psqlSchemaTest()
model.setRelation(1, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__)+"."+qTableName("user", __FILE__), "userid", "username"));
model.setRelation(2, QSqlRelation(qTableName("QTBUG_5373_s2", __FILE__)+"."+qTableName("user", __FILE__), "userid", "username"));
QVERIFY_SQL(model, select());
+
+ model.setJoinMode(QSqlRelationalTableModel::LeftJoin);
+ QVERIFY_SQL(model, select());
+}
+
+void tst_QSqlRelationalTableModel::selectAfterUpdate()
+{
+ QFETCH_GLOBAL(QString, dbName);
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+
+ QSqlRelationalTableModel model(0, db);
+ model.setTable(reltest1);
+ model.setRelation(2, QSqlRelation(reltest2, "tid", "title"));
+ QVERIFY_SQL(model, select());
+ QVERIFY(model.relationModel(2)->rowCount() == 2);
+ {
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("insert into " + reltest2 + " values(3, 'mrs')"));
+ model.relationModel(2)->select();
+ }
+ QVERIFY(model.relationModel(2)->rowCount() == 3);
+ QVERIFY(model.setData(model.index(0,2), 3));
+ QVERIFY(model.submitAll());
+ QCOMPARE(model.data(model.index(0,2)), QVariant("mrs"));
}
QTEST_MAIN(tst_QSqlRelationalTableModel)
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index b26121c..214b2f3 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -5103,24 +5103,28 @@ void tst_QString::toUpperLower_icu()
QLocale::setDefault(QLocale(QLocale::Turkish, QLocale::Turkey));
+ QCOMPARE(s.toUpper(), QString::fromLatin1("I"));
+ QCOMPARE(s.toLower(), QString::fromLatin1("i"));
+
// turkish locale has a capital I with a dot (U+0130, utf8 c4b0)
+ QLocale l;
- QCOMPARE(s.toUpper(), QString::fromUtf8("\xc4\xb0"));
- QCOMPARE(QString::fromUtf8("\xc4\xb0").toLower(), s);
+ QCOMPARE(l.toUpper(s), QString::fromUtf8("\xc4\xb0"));
+ QCOMPARE(l.toLower(QString::fromUtf8("\xc4\xb0")), s);
// nothing should happen here
- QCOMPARE(s.toLower(), s);
- QCOMPARE(QString::fromLatin1("I").toUpper(), QString::fromLatin1("I"));
+ QCOMPARE(l.toLower(s), s);
+ QCOMPARE(l.toUpper(QString::fromLatin1("I")), QString::fromLatin1("I"));
// U+0131, utf8 c4b1 is the lower-case i without a dot
QString sup = QString::fromUtf8("\xc4\xb1");
- QCOMPARE(sup.toUpper(), QString::fromLatin1("I"));
- QCOMPARE(QString::fromLatin1("I").toLower(), sup);
+ QCOMPARE(l.toUpper(sup), QString::fromLatin1("I"));
+ QCOMPARE(l.toLower(QString::fromLatin1("I")), sup);
// nothing should happen here
- QCOMPARE(sup.toLower(), sup);
- QCOMPARE(QString::fromLatin1("i").toLower(), QString::fromLatin1("i"));
+ QCOMPARE(l.toLower(sup), sup);
+ QCOMPARE(l.toLower(QString::fromLatin1("i")), QString::fromLatin1("i"));
// the cleanup function will restore the default locale
}
diff --git a/tests/auto/qxmlquery/pushBaselines/allAtomics.ref b/tests/auto/qxmlquery/pushBaselines/allAtomics.ref
index cceabfe..ddb5bc7 100644
--- a/tests/auto/qxmlquery/pushBaselines/allAtomics.ref
+++ b/tests/auto/qxmlquery/pushBaselines/allAtomics.ref
@@ -1,6 +1,6 @@
startOfSequence()
atomicValue(xs:untypedAtomic)
-atomicValue(2002-10-10T23:02:11)
+atomicValue(2002-10-10T23:02:11Z)
atomicValue(2002-10-10)
atomicValue()
atomicValue()
diff --git a/tests/auto/selftests/expected_printdatatags.txt b/tests/auto/selftests/expected_printdatatags.txt
new file mode 100644
index 0000000..ac22f23
--- /dev/null
+++ b/tests/auto/selftests/expected_printdatatags.txt
@@ -0,0 +1,6 @@
+tst_MyTestCase a data tag a1
+tst_MyTestCase a data tag a2
+tst_MyTestCase b
+tst_MyTestCase c data tag c1
+tst_MyTestCase c data tag c2
+tst_MyTestCase c data tag c3
diff --git a/tests/auto/selftests/expected_printdatatagswithglobaltags.txt b/tests/auto/selftests/expected_printdatatagswithglobaltags.txt
new file mode 100644
index 0000000..32feba4
--- /dev/null
+++ b/tests/auto/selftests/expected_printdatatagswithglobaltags.txt
@@ -0,0 +1,12 @@
+tst_MyTestCase a data tag a1 __global__ global data tag 1
+tst_MyTestCase a data tag a2 __global__ global data tag 1
+tst_MyTestCase a data tag a1 __global__ global data tag 2
+tst_MyTestCase a data tag a2 __global__ global data tag 2
+tst_MyTestCase b __global__ global data tag 1
+tst_MyTestCase b __global__ global data tag 2
+tst_MyTestCase c data tag c1 __global__ global data tag 1
+tst_MyTestCase c data tag c2 __global__ global data tag 1
+tst_MyTestCase c data tag c3 __global__ global data tag 1
+tst_MyTestCase c data tag c1 __global__ global data tag 2
+tst_MyTestCase c data tag c2 __global__ global data tag 2
+tst_MyTestCase c data tag c3 __global__ global data tag 2
diff --git a/tests/auto/selftests/printdatatags/printdatatags.pro b/tests/auto/selftests/printdatatags/printdatatags.pro
new file mode 100644
index 0000000..a134422
--- /dev/null
+++ b/tests/auto/selftests/printdatatags/printdatatags.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+SOURCES += tst_printdatatags.cpp
+QT = core
+
+mac:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = printdatatags
diff --git a/tests/auto/selftests/printdatatags/tst_printdatatags.cpp b/tests/auto/selftests/printdatatags/tst_printdatatags.cpp
new file mode 100644
index 0000000..79f8890
--- /dev/null
+++ b/tests/auto/selftests/printdatatags/tst_printdatatags.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+class tst_MyTestCase: public QObject
+{
+ Q_OBJECT
+private slots:
+ void a_data() const;
+ void a() const;
+
+ void b() const;
+
+ void c_data() const;
+ void c() const;
+};
+
+void tst_MyTestCase::a_data() const
+{
+ QTest::addColumn<int>("x");
+ QTest::addColumn<int>("y");
+
+ QTest::newRow("data tag a1 ") << 1 << 2;
+ QTest::newRow("data tag a2") << 1 << 2;
+}
+
+void tst_MyTestCase::a() const
+{
+}
+
+void tst_MyTestCase::b() const
+{
+}
+
+void tst_MyTestCase::c_data() const
+{
+ QTest::addColumn<int>("x");
+
+ QTest::newRow("data tag c1") << 1;
+ QTest::newRow("data tag c2") << 1;
+ QTest::newRow("data tag c3") << 1;
+}
+
+void tst_MyTestCase::c() const
+{
+}
+
+QTEST_MAIN(tst_MyTestCase)
+
+#include "tst_printdatatags.moc"
diff --git a/tests/auto/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro b/tests/auto/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
new file mode 100644
index 0000000..100ba1c
--- /dev/null
+++ b/tests/auto/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+SOURCES += tst_printdatatagswithglobaltags.cpp
+QT = core
+
+mac:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = printdatatagswithglobaltags
diff --git a/tests/auto/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp b/tests/auto/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
new file mode 100644
index 0000000..6b0e61b
--- /dev/null
+++ b/tests/auto/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+class tst_MyTestCase: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase_data() const;
+ void initTestCase() const;
+
+ void a_data() const;
+ void a() const;
+
+ void b() const;
+
+ void c_data() const;
+ void c() const;
+};
+
+void tst_MyTestCase::initTestCase_data() const
+{
+ QTest::addColumn<int>("f");
+ QTest::addColumn<int>("g");
+
+ QTest::newRow("global data tag 1 ") << 1 << 2;
+ QTest::newRow("global data tag 2") << 1 << 2;
+}
+
+void tst_MyTestCase::initTestCase() const
+{
+}
+
+void tst_MyTestCase::a_data() const
+{
+ QTest::addColumn<int>("x");
+ QTest::addColumn<int>("y");
+
+ QTest::newRow("data tag a1 ") << 1 << 2;
+ QTest::newRow("data tag a2") << 1 << 2;
+}
+
+void tst_MyTestCase::a() const
+{
+}
+
+void tst_MyTestCase::b() const
+{
+}
+
+void tst_MyTestCase::c_data() const
+{
+ QTest::addColumn<int>("x");
+
+ QTest::newRow("data tag c1") << 1;
+ QTest::newRow("data tag c2") << 1;
+ QTest::newRow("data tag c3") << 1;
+}
+
+void tst_MyTestCase::c() const
+{
+}
+
+QTEST_MAIN(tst_MyTestCase)
+
+#include "tst_printdatatagswithglobaltags.moc"
diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro
index 2f1c327..74cd075 100644
--- a/tests/auto/selftests/selftests.pro
+++ b/tests/auto/selftests/selftests.pro
@@ -5,7 +5,8 @@ SUBDIRS = subtest test warnings maxwarnings cmptest globaldata skipglobal skip \
skipinit skipinitdata datetime singleskip assert waitwithoutgui differentexec \
exceptionthrow qexecstringlist datatable commandlinedata\
benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \
- benchliboptions xunit badxml longstring
+ benchliboptions xunit badxml longstring printdatatags \
+ printdatatagswithglobaltags
INSTALLS =
diff --git a/tests/auto/selftests/selftests.qrc b/tests/auto/selftests/selftests.qrc
index f82722b..5bd0e12 100644
--- a/tests/auto/selftests/selftests.qrc
+++ b/tests/auto/selftests/selftests.qrc
@@ -89,6 +89,8 @@
<file>expected_multiexec.txt</file>
<file>expected_multiexec.xml</file>
<file>expected_multiexec.xunitxml</file>
+ <file>expected_printdatatags.txt</file>
+ <file>expected_printdatatagswithglobaltags.txt</file>
<file>expected_qexecstringlist.txt</file>
<file>expected_singleskip.lightxml</file>
<file>expected_singleskip.txt</file>
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 1a95420..3686304 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -245,6 +245,8 @@ void tst_Selftests::runSubTest_data()
<< "xunit"
<< "longstring"
<< "badxml"
+ << "printdatatags"
+ << "printdatatagswithglobaltags"
;
foreach (Logger const& logger, allLoggers()) {
@@ -273,6 +275,12 @@ void tst_Selftests::runSubTest_data()
else if (subtest == "badxml") {
arguments << "-eventcounter";
}
+ else if (subtest == "printdatatags") {
+ arguments << "-datatags";
+ }
+ else if (subtest == "printdatatagswithglobaltags") {
+ arguments << "-datatags";
+ }
// These tests don't work right with loggers other than plain, usually because
// they internally supply arguments to themselves.
@@ -289,6 +297,12 @@ void tst_Selftests::runSubTest_data()
if (subtest == "waitwithoutgui") {
continue;
}
+ if (subtest == "printdatatags") {
+ continue;
+ }
+ if (subtest == "printdatatagswithglobaltags") {
+ continue;
+ }
// `crashes' will not output valid XML on platforms without a crash handler
if (subtest == "crashes") {
continue;
diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp
index 00486d2..cf62f7b 100644
--- a/tests/auto/symbols/tst_symbols.cpp
+++ b/tests/auto/symbols/tst_symbols.cpp
@@ -55,6 +55,8 @@ class tst_Symbols: public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
+
void prefix();
void globalObjects();
};
@@ -89,6 +91,12 @@ static QString symbolToLine(const QString &symbol, const QString &lib)
return result;
}
+void tst_Symbols::initTestCase()
+{
+ QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
+ QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR");
+}
+
/* This test searches through all Qt libraries and searches for symbols
starting with "global constructors keyed to "
diff --git a/tests/benchmarks/corelib/io/qdir/tree/tree.pro b/tests/benchmarks/corelib/io/qdir/tree/tree.pro
index 773f0f7..24a667e 100644
--- a/tests/benchmarks/corelib/io/qdir/tree/tree.pro
+++ b/tests/benchmarks/corelib/io/qdir/tree/tree.pro
@@ -9,3 +9,8 @@ SOURCES += bench_qdir_tree.cpp
RESOURCES += bench_qdir_tree.qrc
QT -= gui
+
+symbian: {
+ TARGET.CAPABILITY = NetworkServices
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
index e8014d6..6e823ff 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
@@ -4,3 +4,8 @@ TARGET = tst_bench_qthreadstorage
SOURCES += tst_qthreadstorage.cpp
QT -= gui
+
+symbian: {
+ TARGET.CAPABILITY = NetworkServices
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/benchmarks/gui/gui.pro b/tests/benchmarks/gui/gui.pro
index d825458..06828f4 100644
--- a/tests/benchmarks/gui/gui.pro
+++ b/tests/benchmarks/gui/gui.pro
@@ -12,7 +12,6 @@ SUBDIRS = \
TRUSTED_BENCHMARKS += \
graphicsview/functional/GraphicsViewBenchmark \
- graphicsview/qgraphicsview \
- painting/qtracebench
+ graphicsview/qgraphicsview
-include(../trusted-benchmarks.pri) \ No newline at end of file
+include(../trusted-benchmarks.pri)
diff --git a/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
index e621d50..b242d60 100755
--- a/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
+++ b/tests/benchmarks/network/kernel/qhostinfo/qhostinfo.pro
@@ -11,3 +11,8 @@ CONFIG += release
# Input
SOURCES += main.cpp
+
+symbian: {
+ TARGET.CAPABILITY = NetworkServices
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/benchmarks/network/network.pro b/tests/benchmarks/network/network.pro
index 692a0a1..52817f9 100644
--- a/tests/benchmarks/network/network.pro
+++ b/tests/benchmarks/network/network.pro
@@ -6,8 +6,7 @@ SUBDIRS = \
socket
TRUSTED_BENCHMARKS += \
- kernel/qhostinfo \
socket/qtcpserver \
ssl/qsslsocket
-include(../trusted-benchmarks.pri) \ No newline at end of file
+include(../trusted-benchmarks.pri)
diff --git a/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro
index 4bdfcb7..30b10d2 100644
--- a/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro
+++ b/tests/benchmarks/network/socket/qtcpserver/qtcpserver.pro
@@ -12,4 +12,7 @@ CONFIG += release
# Input
SOURCES += tst_qtcpserver.cpp
-symbian:TARGET.CAPABILITY += NetworkServices \ No newline at end of file
+symbian: {
+ TARGET.CAPABILITY = NetworkServices
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro b/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro
index da34a02..85ca1e3 100644
--- a/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/benchmarks/network/ssl/qsslsocket/qsslsocket.pro
@@ -11,3 +11,8 @@ CONFIG += release
# Input
SOURCES += tst_qsslsocket.cpp
+
+symbian: {
+ TARGET.CAPABILITY = NetworkServices
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/benchmarks/script/script.pro b/tests/benchmarks/script/script.pro
index 5da05e7..3216b24 100644
--- a/tests/benchmarks/script/script.pro
+++ b/tests/benchmarks/script/script.pro
@@ -13,7 +13,6 @@ SUBDIRS = \
TRUSTED_BENCHMARKS += \
qscriptclass \
qscriptvalue \
- qscriptengine \
qscriptqobject
include(../trusted-benchmarks.pri)
diff --git a/tests/system/declarative/sys_calculator/sys_calculator.pro b/tests/system/declarative/sys_calculator/sys_calculator.pro
new file mode 100644
index 0000000..0ce2973
--- /dev/null
+++ b/tests/system/declarative/sys_calculator/sys_calculator.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_calculator.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_calculator/sys_calculator.qtt b/tests/system/declarative/sys_calculator/sys_calculator.qtt
new file mode 100644
index 0000000..2b6b008
--- /dev/null
+++ b/tests/system/declarative/sys_calculator/sys_calculator.qtt
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+var add = "+";
+var sub = "-";
+var mul = "x";
+var div = "/";
+var xsquared = "x²";
+var plusminus = "±";
+
+testcase = {
+ initTestCase: function()
+ {
+ print("Please ensure that $PATH contains $QTDIR/bin, and $QT_SRC_DIR is set to the Qt source directory");
+ },
+
+ init: function() {
+ testcase.keyCache = {};
+ },
+
+ binary_operations_data: {
+ operation1: ["0", add, "0", "0"],
+ operation2: ["0", sub, "0", "0"],
+ operation3: ["0", mul, "0", "0"],
+ operation4: ["0", div, "0", "NaN"],
+ operation5: ["0", add, "1", "1"],
+ operation6: ["0", sub, "1", "-1"],
+ operation7: ["0", mul, "1", "0"],
+ operation8: ["0", div, "1", "0"],
+ operation9: ["0.56789", add, "7453.0145", "7453.58239"],
+ operation10: ["0.56789", sub, "7453.0145", "-7452.44661"],
+ operation11: ["0.56789", mul, "7453.0145", "4232.492404405"],
+ operation12: ["0.56789", div, "7453.0145", "0.00007619601437780645"]
+ },
+
+ binary_operations: function(FirstOperand, Operator, SecondOperand, ExpectedResult)
+ {
+ startDemo("calculator");
+
+ var display = findByProperty("qmlType", "Text")[1];
+
+ enterNumber( FirstOperand );
+ select( Operator );
+ enterNumber( SecondOperand );
+ select( "=" );
+
+ compare(getValue(display), ExpectedResult);
+ },
+
+ advanced_mode_data: {
+ operation1: ["-123", "Abs", "123"],
+ operation2: ["3.14159", "Int", "3"],
+ operation3: ["65536", "Sqrt", "256"],
+ operation4: ["123", "^2", "15129"],
+ operation5: ["500", "1/x", "0.002"],
+ operation6: ["999", "+/-", "-999"]
+ },
+
+ advanced_mode: function(Operand, Operator, ExpectedResult)
+ {
+ startDemo("calculator");
+ select("Advanced Mode");
+ wait(1000);
+
+ var display = findWidget("qmlType", "Text")[1];
+
+ enterNumber( Operand );
+ select( Operator );
+
+ compare(getValue(display), ExpectedResult);
+ }
+}
+
+// Enter num as a series of CalcButton activations
+function enterNumber(num) {
+ var numString = num.toString();
+ for (var i=0; i<numString.length; i++) {
+ var digit = numString[i];
+ if (testcase.keyCache[digit] == undefined) {
+ // It is necessary to do this instead of select(digit) because
+ // the display may have the same text as the required button...
+ var button = findWidget( { qmlType: "CalcButton", label: digit } );
+ testcase.keyCache[digit] = button;
+ select(button);
+ } else {
+ select(testcase.keyCache[digit]);
+ }
+ }
+}
+
+// Starts a demo QML file
+function startDemo(demo, demoQml) {
+ if (demoQml == undefined) {
+ demoQml = demo;
+ }
+ startApplication("qml", ["$QT_SRC_DIR/demos/declarative/" + demo + "/" + demoQml + ".qml"]);
+}
diff --git a/tests/system/declarative/sys_dial/sys_dial.pro b/tests/system/declarative/sys_dial/sys_dial.pro
new file mode 100644
index 0000000..6840b59
--- /dev/null
+++ b/tests/system/declarative/sys_dial/sys_dial.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_dial.qtt
diff --git a/tests/system/declarative/sys_dial/sys_dial.qtt b/tests/system/declarative/sys_dial/sys_dial.qtt
new file mode 100644
index 0000000..d2ae77e
--- /dev/null
+++ b/tests/system/declarative/sys_dial/sys_dial.qtt
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ qtqmlbat9202: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9202 - Dial example
+
+| *Step* | *Verification* |
+| Execute examples/declarative/ui-components/dialcontrol/dialcontrol.qml | |
+| Press and drag the slider across and back | Verify that the dial responds appropriately with the position of the slider |'));
+ }
+}
diff --git a/tests/system/declarative/sys_flickr/sys_flickr.pro b/tests/system/declarative/sys_flickr/sys_flickr.pro
new file mode 100644
index 0000000..df7bd6f
--- /dev/null
+++ b/tests/system/declarative/sys_flickr/sys_flickr.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_flickr.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_flickr/sys_flickr.qtt b/tests/system/declarative/sys_flickr/sys_flickr.qtt
new file mode 100644
index 0000000..fafb19c
--- /dev/null
+++ b/tests/system/declarative/sys_flickr/sys_flickr.qtt
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/declarative
+
+testcase = {
+
+ qtqmlbat9201: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9201 - Flickr demo
+ | *Step* | *Verification* |
+ | Execute demos/declarative/flickr/flickr.qml | Verify that a dialog with progress wheel is displayed |
+ | Wait for a few moments for the network to connect and download images | Verify that a proper grid is displayed showing flickrs latest images |
+ | On mobile: Select the *View Mode* button | Verify that the view changes to a list in a smooth Wipe transition |
+ | On desktop: Select the *View Mode* button | Verify that the view changes to scrollable dial |
+ | Select the *View Mode* button | Verify that the view reverts to the grid |
+ | Click on the ellipses icon or tags command (if applicable) | Verify that you can enter a tag |
+ | Click OK | Verify that images referring to given tag are displayed |
+ | Select an image | Verify that picture icon moves in to the information panel smoothly and that a new copy of the image is displayed |
+ | Click on the Star Rating (if applicable) | Verify that you can change your rating for the image |
+ | Click on [View]/[More] | Verify that the Flip transition is displayed smoothly and that a full size image is shown |
+ | Move slider to right | Verify that the image zooms in smoothly corresponding with the slider position |
+ | Zoom in completely | Verify that the image zooms in smoothly |
+ | Drag image| Verify that you are able to pan the image up/down left/right (if applicable) |
+ | Leave image in maximum zoom view | |
+ | Click on [Back]/[More] | Verify that the Flip transition is displayed smoothly and that you are returned to the information panel for the image |
+ | Click on [View]/[More] again | Verify that the Flip transition is displayed smoothly and that the image is shown in its original size (not zoomed) |
+ | Revert back to the starting Grid display | Verify that a proper grid is displayed showing flickrs |
+ | Click [Update] | Verify that the grid has updated with fresh images |'));
+ }
+}
diff --git a/tests/system/declarative/sys_parallax/sys_parallax.pro b/tests/system/declarative/sys_parallax/sys_parallax.pro
new file mode 100644
index 0000000..f37fc7f
--- /dev/null
+++ b/tests/system/declarative/sys_parallax/sys_parallax.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_parallax.qtt
diff --git a/tests/system/declarative/sys_parallax/sys_parallax.qtt b/tests/system/declarative/sys_parallax/sys_parallax.qtt
new file mode 100644
index 0000000..5b720d9
--- /dev/null
+++ b/tests/system/declarative/sys_parallax/sys_parallax.qtt
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=examples/parallax
+
+testcase = {
+
+ qtqmlbat9203: function()
+ {
+ prompt(twiki('---+++ QTQMLBAT9203 - Parallax example
+
+| *Step* | *Verification* |
+| Execute examples/declarative/modelviews/parallax/parallax.qml | Verify that a ticking clock is displayed |
+| Press and drag the right side of the display across to the left | Verify that the display shifts to the second screen |
+| - | Verify that a "smiley" is visible, repeatedly bouncing with an approx. 1 second delay |
+| Press and drag the right side of the display across to the left | Verify that the display shifts to the third screen |
+| Press the leftmost side of the scrollbar entity at the bottom of the display | Verify that the display shifts gently to the first screen |'));
+ }
+
+}
+
diff --git a/tests/system/declarative/sys_pincharea/sys_pincharea.pro b/tests/system/declarative/sys_pincharea/sys_pincharea.pro
new file mode 100644
index 0000000..0aed02e
--- /dev/null
+++ b/tests/system/declarative/sys_pincharea/sys_pincharea.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_pincharea.qtt
diff --git a/tests/system/declarative/sys_pincharea/sys_pincharea.qtt b/tests/system/declarative/sys_pincharea/sys_pincharea.qtt
new file mode 100644
index 0000000..b980cb6
--- /dev/null
+++ b/tests/system/declarative/sys_pincharea/sys_pincharea.qtt
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+testcase = {
+
+ pincharea_resize: function()
+ {
+ prompt(twiki('---+++ Scaling
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers apart on any place in the display, and bring them together | Verify that the qt logo is scaled down (becomes smaller), no less than 50% |
+| Place two fingers close together on any place in the display, and push them apart | Verify that the qt logo is scaled up (becomes larger), no more than 200% |
+| Place two fingers apart on any place in the display, and bring them together, then push them apart | Verify that the qt logo is scaled down, then up |
+| Evaluate | All scaling of the logo should be done in sync with the movement of the fingers |'));
+ },
+
+ pincharea_rotate: function()
+ {
+ prompt(twiki('---+++ Rotation
+If the target device is an N8, expect odd behavior when executing this test. The device does not have a multiple touch screen.
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers apart on any place in the display, and turn them in a clockwise circle | The logo rotates with the movement of the fingers |
+| Rotate the logo beyond 180 degrees | The logo stops at 150 degrees and does not invert to -150 degrees |'));
+ },
+
+ pincharea_drag: function()
+ {
+ prompt(twiki('---+++ Dragging
+If the target device is an N8, expect odd behavior when executing this test. The device does not have a multiple touch screen.
+| *Step* | *Verification* |
+| Execute SystemTests/Qt/examples/declarative/pincharea/pincharea.qml | |
+| Press Enable | Enabler button turns green |
+| Place two fingers on the display, and drag around the screen | |
+| | The logo moves in sync with the gesture. The logo does not move its center beyond the bounds of the rectangle |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_rtl/sys_rtl.pro b/tests/system/declarative/sys_rtl/sys_rtl.pro
new file mode 100644
index 0000000..1837d72
--- /dev/null
+++ b/tests/system/declarative/sys_rtl/sys_rtl.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_rtl.qtt
diff --git a/tests/system/declarative/sys_rtl/sys_rtl.qtt b/tests/system/declarative/sys_rtl/sys_rtl.qtt
new file mode 100644
index 0000000..66eb64b
--- /dev/null
+++ b/tests/system/declarative/sys_rtl/sys_rtl.qtt
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ implicit_text_alignment: function()
+ {
+ prompt(twiki('---++ Implicit Text alignment
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Observe the three different element types - Text, TextInput, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the right |
+ },
+
+ left_center_and_right_text_alignment_data:
+ {
+ left: ["Left", "left"],
+ center: ["Center", "center"],
+ right: ["Right", "right"]
+ },
+
+ left_center_and_right_text_alignment: function(name,alignment)
+ {
+ prompt(twiki('---++ '+name+' Text alignment
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Press the indicator until '+name+' alignment shows | Verify that the indicator at the bottom shows '+name+' alignment |
+| Observe the three different element types - Text, TextInput, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the '+alignment+' |
+ },
+
+ justified_text_alignment: function()
+ {
+ prompt(twiki('---++ Justified Text alignment
+Note that this only applies to Text and TextEdit. AlignJustify is not available for TextInput
+Note: Empty/whitepace text has no direction, thus TextEdits will still show the cursor to the left. See http://bugreports.qt.nokia.com/browse/QTBUG-17973
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltext.qml | Verify that the indicator at the bottom shows Implicit alignment |
+| Press the indicator until Justify alignment shows | Verify that the indicator at the bottom shows Justify alignment |
+| Observe two of the three different element types - Text, TextEdit | Verify that for each case where the text box shows right-to-left text, the text is aligned to the right |
+ },
+
+ left_center_and_right_text_alignment_data:
+ {
+ left: ["Left", "left"],
+ center: ["Center", "center"],
+ right: ["Right", "right"]
+ },
+
+ select_copy_paste: function(name,alignment)
+ {
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/rtl/rtltexteditselection.qml | Verify that the indicator at the bottom button shows Implicit alignment |
+| (Skip this on devices with no Home/End key) In the right-to-left TextInput, press Home, then End | Verify the cursor moves fully to the right of the text only, and then fully to the left side respectively |
+| Press the lower button until it shows '+name+' Alignment | |
+| In the TextEdit field, select some of the text some of the Arabic text | The selected text is shown in the Paste: <text> button - it is now copied |
+| At the leftmost position of the text, press Enter on the keypad or soft keyboard | A new line is created below the existing text |
+| Press the Paste: <text> button | The text is pasted into the box, also '+alignment+' aligned |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_samegame/sys_samegame.pro b/tests/system/declarative/sys_samegame/sys_samegame.pro
new file mode 100644
index 0000000..495a843
--- /dev/null
+++ b/tests/system/declarative/sys_samegame/sys_samegame.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_samegame.qtt
diff --git a/tests/system/declarative/sys_samegame/sys_samegame.qtt b/tests/system/declarative/sys_samegame/sys_samegame.qtt
new file mode 100644
index 0000000..13177fa
--- /dev/null
+++ b/tests/system/declarative/sys_samegame/sys_samegame.qtt
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=demos/samegame
+
+testcase = {
+
+ qtqmlbat9204: function(){
+ prompt(twiki('---+++ QTQMLBAT9204 - Samegame demo
+
+ | *Step* | *Verification* |
+ | Execute demos/declarative/samegame/samegame.qml | Verify that the Samegame application starts smoothly |
+ | Click on [New Game] | Verify that the balls drop down from top in a smooth fashion |
+ | Click on a grouping of same colored balls | Verify that the balls disappear smoothly and that visual effects (sparkles) are properly shown |
+ | Keep on playing until you clear a whole column of balls | Verify that the body of balls to the right of the column move smoothly to fill the void |
+ | Click on a single colored ball | Verify that this has no effect on the game |
+ | Play the game till the end | Verify that you are prompted to enter your name |
+ | | Verify that you are displayed your score and time taken to achieve that |
+ | Click on [New Game] again | Verify that the transition from score screen to new playing field is smooth |'));
+ }
+}
+
diff --git a/tests/system/declarative/sys_textedit/sys_textedit.pro b/tests/system/declarative/sys_textedit/sys_textedit.pro
new file mode 100644
index 0000000..30d6d5b
--- /dev/null
+++ b/tests/system/declarative/sys_textedit/sys_textedit.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_textedit.qtt
diff --git a/tests/system/declarative/sys_textedit/sys_textedit.qtt b/tests/system/declarative/sys_textedit/sys_textedit.qtt
new file mode 100644
index 0000000..7c54611
--- /dev/null
+++ b/tests/system/declarative/sys_textedit/sys_textedit.qtt
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ select_text: function()
+ {
+ prompt(twiki('---++ Text Selection
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Select Word button, ensuring the previously entered text in no longer in pre-commit mode | World is selected |
+| Press the Select All button | Hello World is selected |
+| Press the Select None button | No text is selected |
+| Press the Mouse Select button | The button turns green and indicates Mouse On |
+| Click and drag over some text | Only that text is selected. On sans-keyboard Symbian, the soft keyboard may show with selected text highlighted |
+| If the soft keyboard is shown, close it | |
+| Press the Mouse Select button | The button turns gray and indicates Mouse Off |
+| Click and drag over some text | No text is selected. On sans-keyboard Symbian, the soft keyboard may show |
+'));
+ },
+
+ cut_copy_and_paste: function()
+ {
+ prompt(twiki('---++ Cut, copy and paste
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Select All button | Hello World is selected |
+| Press the Copy Button | |
+| Press the Paste Button | Hello World is copied to the light-blue textedit |
+| Press the Select Word button | World is highlighted |
+| Press the Cut button | World is removed from the green textedit |
+| Press the Paste button | World is added to the light-blue textedit |
+'));
+ },
+
+ styling: function()
+ {
+ prompt(twiki('---++ Text Styling
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello World into the green textedit field | Hello World is shown |
+| Press the Bold button | Hello World is now in bold |
+| Press the Italics button | Hello World is now in italics |
+| Press the Strikeout button | Hello World now has a line passing through it |
+| Press the Underline button | Hello World is now underlined | '));
+ },
+
+ cursor_behavior: function()
+ {
+ prompt(twiki('---++ Cursor Behavior
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | The Cursor button shows enabled (green) |
+| Enter enough text into the field such that it passes beyond the far right | The text wraps to line 2 |
+| Press the Cursor button as to disable it | The cursor disappears |
+| Press the Cursor button as to enable it | The cursor appears | '));
+ },
+
+ capitalization: function()
+ {
+ prompt(twiki('---++ Capitalization
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textedit/textedit.qml | |
+| Enter Hello to this World into the green textedit field | Hello to this World is shown |
+| Press the All Upper button | The text is converted to all upper case |
+| Press the All Lower button | The text is converted to all lower case |
+| Press the Small Caps button | The text is converted to all small sized upper case characters |
+| Press the Capitalize button | The text is shown with each first character of every word capitalized | '));
+ }
+
+}
diff --git a/tests/system/declarative/sys_textinput/sys_textinput.pro b/tests/system/declarative/sys_textinput/sys_textinput.pro
new file mode 100644
index 0000000..a11f821
--- /dev/null
+++ b/tests/system/declarative/sys_textinput/sys_textinput.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_textinput.qtt
diff --git a/tests/system/declarative/sys_textinput/sys_textinput.qtt b/tests/system/declarative/sys_textinput/sys_textinput.qtt
new file mode 100644
index 0000000..e0d0490
--- /dev/null
+++ b/tests/system/declarative/sys_textinput/sys_textinput.qtt
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ select_text: function()
+ {
+ prompt(twiki('---++ Text Selection
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Select Word button | World is selected |
+| Press the Select All button | Hello World is selected |
+| Press the Select None button | No text is selected |
+| Press the Mouse Select button | The button turns green and indicates Mouse On |
+| Click and drag over some text | Only that text is selected. On sans-keyboard Symbian, the soft keyboard will show with selected text highlighted |
+| Press the Mouse Select button | The button turns gray and indicates Mouse Off |
+| Click and drag over some text | No text is selected. On sans-keyboard Symbian, the soft keyboard will show |
+'));
+ },
+
+ cut_copy_and_paste: function()
+ {
+ prompt(twiki('---++ Cut, copy and paste
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Select All button | Hello World is selected |
+| Press the Copy Button | |
+| Press the Paste Button | Hello World is copied to the light-blue textinput |
+| Press the Select Word button | World is highlighted |
+| Press the Cut button | World is removed from the green textinput |
+| Press the Paste button | World is added to the light-blue textinput |
+'));
+ },
+
+ password_echo_mode: function()
+ {
+ prompt(twiki('---++ Password Echo
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Password button | Hello World is now a string of asterisks |
+| Enter an exclamation mark | An asterisk is added to the string |
+| Press the No Echo button | No text is visible |
+| Enter an exclamation mark | No text is shown |
+| Press the Password Edit button | A string of asterisks is shown |
+| Enter an exclamation mark | An exclamation mark appears at the end of the asterisks, but shortly becomes an asterisk |
+| Press the Normal button | Hello World!!! is now displayed |
+'));
+ },
+
+ styling: function()
+ {
+ prompt(twiki('---++ Text Styling
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello World into the green textinput field | Hello World is shown |
+| Press the Bold button | Hello World is now in bold |
+| Press the Italics button | Hello World is now in italics |
+| Press the Strikeout button | Hello World now has a line passing through it |
+| Press the Underline button | Hello World is now underlined | '));
+ },
+
+ cursor_behavior: function()
+ {
+ prompt(twiki('---++ Cursor Behavior
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter enough text into the field such that it passes beyond the far right | The first half of the text is shown |
+| Press the Autoscroll button | The far right edge shows the last character of the text |
+| Enter some more text | The TextInput scrolls the text so that the last character is always visible |
+| Move the cursor to the left of the input field | |
+| Move a couple of characters further to the left | Scrolling follows the cursor |
+| Press the Autoscroll button | The text is shown from the start |
+| Press the Cursor button as to disable it | The cursor disappears |
+| Press the Cursor button as to enable it | The cursor appears | '));
+ },
+
+ capitalization: function()
+ {
+ prompt(twiki('---++ Capitalization
+
+| *Step* | *Verification* |
+| Execute systemtests/Qt/examples/declarative/textinput/textinput.qml | |
+| Enter Hello to this World into the green textinput field | Hello to this World is shown |
+| Press the All Upper button | The text is converted to all upper case |
+| Press the All Lower button | The text is converted to all lower case |
+| Press the Small Caps button | The text is converted to all small sized upper case characters |
+| Press the Capitalize button | The text is shown with each first character of every word capitalized | '));
+ }
+
+}
diff --git a/tests/system/declarative/sys_twitter/sys_twitter.pro b/tests/system/declarative/sys_twitter/sys_twitter.pro
new file mode 100644
index 0000000..96f61f0
--- /dev/null
+++ b/tests/system/declarative/sys_twitter/sys_twitter.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_twitter.qtt
diff --git a/tests/system/declarative/sys_twitter/sys_twitter.qtt b/tests/system/declarative/sys_twitter/sys_twitter.qtt
new file mode 100644
index 0000000..64dc024
--- /dev/null
+++ b/tests/system/declarative/sys_twitter/sys_twitter.qtt
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=demos/twitter
+
+testcase = {
+
+ qtxmlbat9205: function() {
+ prompt(twiki('---+++ QTQMLBAT9205 - Twitter demo
+
+ | *Step* | *Verification* |
+ | Execute the demos/declarative/twitter/twitter.qml | Verify that the Twitter application starts smoothly |
+ | Either enter you Twitter credentials or click [Guest] | Verify that Twitter opens up as expected |
+ | Scroll down the list of tweets | Verify that the list scrolls smoothly as expected |
+ | Click the [Ellipsis] icon and enter a search term | Verify that the latest tweets from the searched twitter are displayed |
+ | Click [Return Home] | Verify that you are taken to the main twitter display screen |
+ | Click [Update] | Verify that the list of twitts has updated|
+ | Click on a Twitters handle | Verify that twitts from that twitter are displayed |'));
+ }
+
+}
diff --git a/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro b/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro
new file mode 100644
index 0000000..958bd0c
--- /dev/null
+++ b/tests/system/declarative/sys_webbrowser/sys_webbrowser.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_webbrowser.qtt
+CONFIG+=systemtest
diff --git a/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt b/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt
new file mode 100644
index 0000000..6313691
--- /dev/null
+++ b/tests/system/declarative/sys_webbrowser/sys_webbrowser.qtt
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ web1: function()
+ {
+ startApplication("qmlviewer", ["$QT_SRC_DIR/demos/declarative/webbrowser/webbrowser.qml"]);
+ print(getenv("QT_SRC_DIR"));
+ if(getenv("QT_SRC_DIR") == "") {
+ skip("Please set environment variable QT_SRC_DIR to source root", SkipAll);
+ }
+ var url = findWidget( { qmlType: "TextInput" } );
+ var title = findWidget( { qmlType: "Text" } )[0];
+ var web = findWidget( { qmlType: "WebView" } );
+ expect(function(){ return getProperty(web, "progress") == 1 }, 5000, 1, "Page not loaded in time");
+ enter("http://www.google.com", url);
+ expect(function(){ return getProperty(web, "progress") == 1 }, 5000, 1, "Page not loaded in time");
+ }
+}
+
diff --git a/tests/system/sys_addressbook/sys_addressbook.pro b/tests/system/sys_addressbook/sys_addressbook.pro
new file mode 100644
index 0000000..ba86106
--- /dev/null
+++ b/tests/system/sys_addressbook/sys_addressbook.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_addressbook.qtt
diff --git a/tests/system/sys_addressbook/sys_addressbook.qtt b/tests/system/sys_addressbook/sys_addressbook.qtt
new file mode 100644
index 0000000..5159be3
--- /dev/null
+++ b/tests/system/sys_addressbook/sys_addressbook.qtt
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // addressbook
+ // if the contact name is not at between A~Z or (a~z),which Tab it will in?
+ test_addressbook:function(contact_name,contact_address,tabname) {
+ startApplication("$QTDIR/examples/itemviews/addressbook/addressbook");
+ select("Add");
+
+ enter(contact_name, "Name");
+ compare(getText("Name"), contact_name);
+ enter(contact_address, "Address");
+ compare( getText("Address"), contact_address);
+
+ select("OK");
+
+ select(tabname, tabBar());
+ var table = findByProperty({inherits: "QAbstractTableModel"});
+ selectIndex([0,0],table);
+ compare(getSelectedText(table), contact_name);
+ selectIndex([0,1],table);
+ compare(getSelectedText(table), contact_address);
+ },
+ test_addressbook_data: {
+ contact1: ["AAA", "bbb", "ABC"],
+ contact2: ["EEE", "fff", "DEF"]
+ }
+}
diff --git a/tests/system/sys_analogclock/sys_analogclock.pro b/tests/system/sys_analogclock/sys_analogclock.pro
new file mode 100644
index 0000000..a124cb7
--- /dev/null
+++ b/tests/system/sys_analogclock/sys_analogclock.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_analogclock.qtt
diff --git a/tests/system/sys_analogclock/sys_analogclock.qtt b/tests/system/sys_analogclock/sys_analogclock.qtt
new file mode 100644
index 0000000..9fe42cf
--- /dev/null
+++ b/tests/system/sys_analogclock/sys_analogclock.qtt
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // analogclock
+ test_analogclock: function() {
+ startApplication("$QTDIR/examples/widgets/analogclock/analogclock");
+ verifyImage("analogclock_1");
+ // wait for the screensaver
+ wait(6000);
+ verifyImage("analogclock_2");
+ }
+}
diff --git a/tests/system/sys_animatedtiles/sys_animatedtiles.pro b/tests/system/sys_animatedtiles/sys_animatedtiles.pro
new file mode 100644
index 0000000..3efa4e0
--- /dev/null
+++ b/tests/system/sys_animatedtiles/sys_animatedtiles.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_animatedtiles.qtt
diff --git a/tests/system/sys_animatedtiles/sys_animatedtiles.qtt b/tests/system/sys_animatedtiles/sys_animatedtiles.qtt
new file mode 100644
index 0000000..6b14a51
--- /dev/null
+++ b/tests/system/sys_animatedtiles/sys_animatedtiles.qtt
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // verifyImage() *is* useful here, as the images should match on subsequent test runs
+
+ test_animatedtiles: function() {
+
+ startApplication("$QTDIR/examples/animation/animatedtiles/animatedtiles");
+ var buttons = findWidget( { className: "Button" } );
+ var ellipse = buttons[0];
+ var figure8 = buttons[1];
+ var random = buttons[2];
+ var tiled = buttons[3];
+ var center = buttons[4];
+
+ mouseClick(ellipse);
+ wait(3000);
+ verifyImage("animatedtiles_ellipse");
+ mouseClick(figure8);
+ wait(3000);
+ verifyImage("animatedtiles_figure8");
+ mouseClick(random);
+ wait(3000);
+ verifyImage("animatedtiles_random");
+ mouseClick(tiled);
+ wait(3000);
+ verifyImage("animatedtiles_tiled");
+ mouseClick(center);
+ wait(3000);
+ verifyImage("animatedtiles_centered");
+ }
+}
diff --git a/tests/system/sys_anomaly/sys_anomaly.pro b/tests/system/sys_anomaly/sys_anomaly.pro
new file mode 100644
index 0000000..99f9b9d
--- /dev/null
+++ b/tests/system/sys_anomaly/sys_anomaly.pro
@@ -0,0 +1,2 @@
+SOURCES=sys_anomaly.qtt
+CONFIG+=systemtest
diff --git a/tests/system/sys_anomaly/sys_anomaly.qtt b/tests/system/sys_anomaly/sys_anomaly.qtt
new file mode 100644
index 0000000..330ec85
--- /dev/null
+++ b/tests/system/sys_anomaly/sys_anomaly.qtt
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // anomaly
+ test_anomaly: function() {
+
+ startApplication("$QTDIR/demos/embedded/anomaly/anomaly");
+
+ var lineEdit = findWidget( {className: "QLineEdit"} );
+ enter("qt.nokia.com", lineEdit);
+ select("Go");
+ var browserView = findWidget( {className: "BrowserView"} );
+ var web = findWidget( { inherits: "QWebView" } );
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ var back = backButton();
+
+ var zoomIn = zoomInButton();
+ var zoomOut = zoomOutButton();
+
+ //zoom in
+ mouseClick(zoomIn);
+ wait(2000);
+ mouseClick(zoomIn);
+ wait(2000);
+
+ //zoom out
+ mouseClick(zoomOut);
+ wait(2000);
+
+ select("Introducing the Qt Board Verification Program",web);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ wait(1000);
+ mouseClick(back);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ select("Official News",web);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ verify(getProperty(web, "title").contains("News"));
+ wait(1000);
+ mouseClick(back);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ select("Downloads",web);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ verify(getProperty(web, "title").contains("Downloads"));
+ wait(1000);
+ mouseClick(back);
+ waitFor(20000) { return getProperty(web, "progress") == 1; }
+ }
+}
diff --git a/tests/system/sys_collidingmice/sys_collidingmice.pro b/tests/system/sys_collidingmice/sys_collidingmice.pro
new file mode 100644
index 0000000..dff65ca
--- /dev/null
+++ b/tests/system/sys_collidingmice/sys_collidingmice.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_collidingmice.qtt
diff --git a/tests/system/sys_collidingmice/sys_collidingmice.qtt b/tests/system/sys_collidingmice/sys_collidingmice.qtt
new file mode 100644
index 0000000..8334ce5
--- /dev/null
+++ b/tests/system/sys_collidingmice/sys_collidingmice.qtt
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // collidingmice
+ test_collidingmice: function() {
+
+ startApplication("$QTDIR/examples/graphicsview/collidingmice/collidingmice");
+ verifyImage("collidingmice_1");
+ wait(500);
+ verifyImage("collidingmice_2");
+ wait(500);
+ verifyImage("collidingmice_3");
+ wait(500);
+ verifyImage("collidingmice_4");
+
+ }
+}
diff --git a/tests/system/sys_imagegestures/sys_imagegestures.pro b/tests/system/sys_imagegestures/sys_imagegestures.pro
new file mode 100644
index 0000000..640803d
--- /dev/null
+++ b/tests/system/sys_imagegestures/sys_imagegestures.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_imagegestures.qtt
diff --git a/tests/system/sys_imagegestures/sys_imagegestures.qtt b/tests/system/sys_imagegestures/sys_imagegestures.qtt
new file mode 100644
index 0000000..78d5f23
--- /dev/null
+++ b/tests/system/sys_imagegestures/sys_imagegestures.qtt
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // imagegestures
+ // ?? QtUiTest should support these gestures: swipe, pan and pinch.??
+ // ?? How to press the minimize button, maximize button and close button in QtUiTest?
+
+ test_imagegestures: function() {
+
+ startApplication("imagegestures");
+ verifyImage("imagegestures_1");
+
+ select("Choose");
+ wait(6000);
+ }
+}
diff --git a/tests/system/sys_masterdetail/sys_masterdetail.pro b/tests/system/sys_masterdetail/sys_masterdetail.pro
new file mode 100644
index 0000000..792a3ce
--- /dev/null
+++ b/tests/system/sys_masterdetail/sys_masterdetail.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_masterdetail.qtt
diff --git a/tests/system/sys_masterdetail/sys_masterdetail.qtt b/tests/system/sys_masterdetail/sys_masterdetail.qtt
new file mode 100644
index 0000000..67599ab
--- /dev/null
+++ b/tests/system/sys_masterdetail/sys_masterdetail.qtt
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // ?? How to select image??
+ // ?? How to compare image??
+ test_masterdetail: function() {
+
+ startApplication("$QTDIR/examples/sql/masterdetail/masterdetail");
+ // need to verifyImage
+ verifyImage("masterdetail_1");
+
+ //select an art form artilst
+ var artist = findWidget({className: "QComboBox"});
+ select("Ane Brun",artist);
+ //print(getLabels());
+ verify(getLabels().join().contains("Details/Artist : Ane Brun"));
+ verify(getLabels().join().contains("Number of Albums: 2"));
+
+ verifyImage("masterdetail_2");
+
+ // choose the albums, please see the chages in the datails.
+ var album = findWidget({className: "QTableView"});
+ select("Spending Time With Morgan",album);
+ //print(getLabels());
+ verify(getLabels().join().contains("Details/Title: Spending Time With Morgan (2003)"));
+ verifyImage("masterdetail_3");
+
+ select("A Temporary Dive",album);
+ //print(getLabels());
+ verify(getLabels().join().contains("Details/Title: A Temporary Dive (2005)"));
+ verifyImage("masterdetail_4");
+ }
+}
diff --git a/tests/system/sys_previewer/sys_previewer.pro b/tests/system/sys_previewer/sys_previewer.pro
new file mode 100644
index 0000000..39850e7
--- /dev/null
+++ b/tests/system/sys_previewer/sys_previewer.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_previewer.qtt
diff --git a/tests/system/sys_previewer/sys_previewer.qtt b/tests/system/sys_previewer/sys_previewer.qtt
new file mode 100644
index 0000000..a6e1293
--- /dev/null
+++ b/tests/system/sys_previewer/sys_previewer.qtt
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // previewer
+ test_previewer: function() {
+ startApplication("$QTDIR/examples/webkit/previewer/previewer");
+ verifyImage("previewer_1");
+
+ //get editor
+ var editor = findWidget({className: "QPlainTextEdit"});
+
+ //get previewer
+ var previewer = findWidget({className: "QWebView"});
+
+ prompt(getText(editor));
+ prompt(getText(previewer));
+
+ select("Clear");
+ select("Preview");
+ verifyImage("previewer_2");
+ }
+}
diff --git a/tests/system/sys_qftp/sys_qftp.pro b/tests/system/sys_qftp/sys_qftp.pro
new file mode 100644
index 0000000..00d6cc7
--- /dev/null
+++ b/tests/system/sys_qftp/sys_qftp.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_qftp.qtt
diff --git a/tests/system/sys_qftp/sys_qftp.qtt b/tests/system/sys_qftp/sys_qftp.qtt
new file mode 100644
index 0000000..0c791f8
--- /dev/null
+++ b/tests/system/sys_qftp/sys_qftp.qtt
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // qftp
+ test_qftp: function() {
+ startApplication("$QTDIR/examples/network/qftp/qftp");
+
+ select("Connect");
+
+ //wait for connection to server
+ waitFor() { return getLabels().contains("Logged onto ftp.qt.nokia.com."); }
+
+ //select a file robots.txt
+ var fileList = findWidget( {inherits: "QTreeWidget"} );
+ waitFor() { return getList(fileList).contains("robots.txt"); }
+
+ select("robots.txt", fileList);
+ select("Download");
+
+ var messageBox = findByProperty({inherits: "QMessageBox"});
+ var progressDialog = findByProperty({inherits: "QProgressDialog"});
+
+ if(isVisible(messageBox) && progressDialog.length == 0)
+ {
+ select("OK");
+ print("The file exists.");
+ } else {
+ waitFor() { return getLabels().contains("Downloaded robots.txt to current directory."); }
+ }
+ }
+}
diff --git a/tests/system/sys_svgviewer/sys_svgviewer.pro b/tests/system/sys_svgviewer/sys_svgviewer.pro
new file mode 100644
index 0000000..95bb0ca
--- /dev/null
+++ b/tests/system/sys_svgviewer/sys_svgviewer.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_svgviewer.qtt
diff --git a/tests/system/sys_svgviewer/sys_svgviewer.qtt b/tests/system/sys_svgviewer/sys_svgviewer.qtt
new file mode 100644
index 0000000..e087175
--- /dev/null
+++ b/tests/system/sys_svgviewer/sys_svgviewer.qtt
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // svgviewer
+ test_svgviewer: function() {
+
+ startApplication("$QTDIR/examples/painting/svgviewer/svgviewer");
+ verifyImage("svgviewer_1");
+
+ //select menu
+ select("Renderer/Image",menuBar());
+ // select("Image");
+ verifyImage("svgviewer_2");
+ }
+}
diff --git a/tests/system/sys_wiggly/sys_wiggly.pro b/tests/system/sys_wiggly/sys_wiggly.pro
new file mode 100644
index 0000000..9481a83
--- /dev/null
+++ b/tests/system/sys_wiggly/sys_wiggly.pro
@@ -0,0 +1,2 @@
+CONFIG+=systemtest
+SOURCES=sys_wiggly.qtt
diff --git a/tests/system/sys_wiggly/sys_wiggly.qtt b/tests/system/sys_wiggly/sys_wiggly.qtt
new file mode 100644
index 0000000..0d3dd18
--- /dev/null
+++ b/tests/system/sys_wiggly/sys_wiggly.qtt
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+testcase = {
+
+ // wiggly
+ // ?? How to compare the text which we input in the lineEdit and the animated text in the wigglywidget ??
+ test_wiggly: function(text) {
+
+ startApplication("$QTDIR/examples/widgets/wiggly/wiggly");
+ verifyImage("wiggly_1");
+
+ var lineEdit = findWidget({classname: "QLineEdit"});
+ enter(text,lineEdit);
+ compare(getSelectedText(lineEdit), text);
+ verifyImage("wiggly_2");
+ wait(1000);
+ verifyImage("wiggly_3");
+ },
+ test_wiggly_data:{
+ text1: ["hello Qt"],
+ text2: ["a#b %c^defghighllahdal^^$^"]
+ },
+}