summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 10:11:49 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 12:48:52 +0200
commit04d0a9626ce61b2e05a40f9562c2bcf12e234639 (patch)
treef1643f829aedc9ac51fcc260f7df2639dfe08360 /tests
parent17f3451daa286b88a52f18c802d7b158dfb653b2 (diff)
parentbdc417b3828737334723eae23097c85f70c23a33 (diff)
Merge branch 'master' into refactor
Conflicts: src/gui/kernel/qapplication_qpa.cpp src/gui/kernel/qcursor_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.h src/gui/kernel/qwindowsysteminterface_qpa_p.h src/gui/text/qtextcontrol.cpp src/plugins/platforms/wayland/wayland.pro src/widgets/accessible/qaccessible2.h src/widgets/widgets/qwidgetlinecontrol_p.h Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/macgui/macgui.pro1
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp6
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp490
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp4
-rw-r--r--tests/auto/qcssparser/tst_qcssparser.cpp8
-rw-r--r--tests/auto/qdbusconnection/tst_qdbusconnection.cpp202
-rw-r--r--tests/auto/qdbusinterface/tst_qdbusinterface.cpp71
-rw-r--r--tests/auto/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/qeventloop/tst_qeventloop.cpp25
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp2
-rw-r--r--tests/auto/qfocusevent/qfocusevent.pro2
-rw-r--r--tests/auto/qfont/tst_qfont.cpp4
-rw-r--r--tests/auto/qfontdatabase/tst_qfontdatabase.cpp15
-rw-r--r--tests/auto/qfontdialog/qfontdialog.pro2
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp13
-rw-r--r--tests/auto/qftp/qftp.pro2
-rw-r--r--tests/auto/qglthreads/tst_qglthreads.cpp37
-rw-r--r--tests/auto/qglyphrun/tst_qglyphrun.cpp18
-rw-r--r--tests/auto/qgraphicseffect/qgraphicseffect.pro2
-rw-r--r--tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro2
-rw-r--r--tests/auto/qgraphicsitem/qgraphicsitem.pro2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp32
-rw-r--r--tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro2
-rw-r--r--tests/auto/qgraphicsscene/qgraphicsscene.pro1
-rw-r--r--tests/auto/qgraphicstransform/qgraphicstransform.pro2
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp2
-rw-r--r--tests/auto/qgraphicsview/qgraphicsview.pro1
-rw-r--r--tests/auto/qgraphicswidget/qgraphicswidget.pro1
-rw-r--r--tests/auto/qgridlayout/tst_qgridlayout.cpp2
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp2
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/auto/qlistview/qlistview.pro2
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp20
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp3
-rw-r--r--tests/auto/qobject/tst_qobject.cpp95
-rw-r--r--tests/auto/qpainter/qpainter.pro1
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp21
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp6
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp4
-rw-r--r--tests/auto/qrawfont/tst_qrawfont.cpp24
-rw-r--r--tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp7
-rw-r--r--tests/auto/qsqlerror/tst_qsqlerror.cpp16
-rw-r--r--tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem76
-rw-r--r--tests/auto/qsslcertificate/more-certificates/test-cn-with-drink-cert.pem74
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp25
-rw-r--r--tests/auto/qsslcertificate/verify-certs/cacert.pem30
-rw-r--r--tests/auto/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem74
-rw-r--r--tests/auto/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem56
-rw-r--r--tests/auto/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem56
-rw-r--r--tests/auto/qsslcertificate/verify-certs/test-ocsp-good-cert.pem74
-rw-r--r--tests/auto/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp1
-rw-r--r--tests/auto/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp1
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp42
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp20
-rw-r--r--tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp4
-rw-r--r--tests/auto/qtableview/qtableview.pro1
-rw-r--r--tests/auto/qtcpsocket/test/test.pro2
-rw-r--r--tests/auto/qtextedit/qtextedit.pro2
-rw-r--r--tests/auto/qtextlayout/qtextlayout.pro1
-rw-r--r--tests/auto/qtipc/qtipc.pro9
-rw-r--r--tests/auto/qtreeview/qtreeview.pro2
-rw-r--r--tests/auto/qundogroup/qundogroup.pro2
-rw-r--r--tests/auto/qundogroup/tst_qundogroup.cpp5
-rw-r--r--tests/auto/qundostack/qundostack.pro2
-rw-r--r--tests/auto/qundostack/tst_qundostack.cpp5
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp3
-rw-r--r--tests/auto/selftests/tst_selftests.cpp2
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h15
68 files changed, 1408 insertions, 332 deletions
diff --git a/tests/auto/macgui/macgui.pro b/tests/auto/macgui/macgui.pro
index 7e40d81808..8a57a8c54b 100644
--- a/tests/auto/macgui/macgui.pro
+++ b/tests/auto/macgui/macgui.pro
@@ -11,3 +11,4 @@ QT = core-private gui-private
requires(mac)
+CONFIG+=insignificant_test # QTBUG-20984, fails unstably
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index c919df136f..db9110f525 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -1244,8 +1244,12 @@ void tst_QAbstractItemView::task200665_itemEntered()
QCursor::setPos( view.viewport()->mapToGlobal(rect.center()) );
QSignalSpy spy(&view, SIGNAL(entered(QModelIndex)));
view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum());
- QCOMPARE(spy.count(), 1);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20753 QCursor::setPos() is broken for QPA", Continue);
+#endif
+
+ QCOMPARE(spy.count(), 1);
}
void tst_QAbstractItemView::task257481_emptyEditor()
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 1ab630d020..d8aa382548 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -187,7 +187,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);
}
@@ -229,6 +230,7 @@ private slots:
void navigateHierarchy();
void navigateSlider();
void navigateCovered();
+ void textAttributes();
void hideShowTest();
void userActionCount();
@@ -258,6 +260,9 @@ private slots:
void scrollAreaTest();
void tableWidgetTest();
void tableViewTest();
+ void table2ListTest();
+ void table2TreeTest();
+ void table2TableTest();
void calendarWidgetTest();
void dockWidgetTest();
void comboBoxTest();
@@ -288,6 +293,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";
@@ -854,6 +863,60 @@ void tst_QAccessibility::accessibleName()
QTestAccessibility::clearEvents();
}
+void tst_QAccessibility::textAttributes()
+{
+ QTextEdit textEdit;
+ int startOffset;
+ int endOffset;
+ QString attributes;
+ QString text("<html><head></head><body>"
+ "Hello, <b>this</b> is an <i><b>example</b> text</i>."
+ "<span style=\"font-family: monospace\">Multiple fonts are used.</span>"
+ "Multiple <span style=\"font-size: 8pt\">text sizes</span> are used."
+ "Let's give some color to <span style=\"color:#f0f1f2; background-color:#14f01e\">Qt</span>."
+ "</body></html>");
+
+ textEdit.setText(text);
+ QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&textEdit);
+
+ QAccessibleTextInterface *textInterface=interface->textInterface();
+
+ QVERIFY(textInterface);
+ QCOMPARE(textInterface->characterCount(), 112);
+
+ attributes = textInterface->attributes(10, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 7);
+ QCOMPARE(endOffset, 11);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-weight:bold;")));
+
+ attributes = textInterface->attributes(18, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 18);
+ QCOMPARE(endOffset, 25);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-weight:bold;")));
+ QVERIFY(attributes.contains(QLatin1String(";font-style:italic;")));
+
+ attributes = textInterface->attributes(34, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 31);
+ QCOMPARE(endOffset, 55);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-family:\"monospace\";")));
+
+ attributes = textInterface->attributes(65, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 64);
+ QCOMPARE(endOffset, 74);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";font-size:8pt;")));
+
+ attributes = textInterface->attributes(110, &startOffset, &endOffset);
+ QCOMPARE(startOffset, 109);
+ QCOMPARE(endOffset, 111);
+ attributes.prepend(';');
+ QVERIFY(attributes.contains(QLatin1String(";background-color:rgb(20,240,30);")));
+ QVERIFY(attributes.contains(QLatin1String(";color:rgb(240,241,242);")));
+}
+
void tst_QAccessibility::hideShowTest()
{
QWidget * const window = new QWidget();
@@ -957,18 +1020,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 {
@@ -1679,6 +1745,8 @@ void tst_QAccessibility::textEditTest()
{
{
QTextEdit edit;
+ int startOffset;
+ int endOffset;
QString text = "hello world\nhow are you today?\n";
edit.setText(text);
edit.show();
@@ -1688,6 +1756,12 @@ void tst_QAccessibility::textEditTest()
QCOMPARE(iface->childCount(), 6);
QCOMPARE(iface->text(QAccessible::Value, 4), QString("hello world"));
QCOMPARE(iface->text(QAccessible::Value, 5), QString("how are you today?"));
+ QCOMPARE(iface->textInterface()->textAtOffset(8, QAccessible2::WordBoundary, &startOffset, &endOffset), QString("world"));
+ QCOMPARE(startOffset, 6);
+ QCOMPARE(endOffset, 11);
+ QCOMPARE(iface->textInterface()->textAtOffset(14, QAccessible2::LineBoundary, &startOffset, &endOffset), QString("how are you today?"));
+ QCOMPARE(startOffset, 12);
+ QCOMPARE(endOffset, 30);
QCOMPARE(iface->text(QAccessible::Value, 6), QString());
QCOMPARE(iface->textInterface()->characterCount(), 31);
QFontMetrics fm(edit.font());
@@ -1720,6 +1794,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);
@@ -1785,6 +1862,7 @@ void tst_QAccessibility::listViewTest()
}
QTestAccessibility::clearEvents();
+#endif
}
@@ -2020,9 +2098,71 @@ void tst_QAccessibility::lineEditTest()
QTestAccessibility::clearEvents();
le2->setFocus(Qt::TabFocusReason);
QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le2, 0, QAccessible::Focus)));
+
+ le->setText(QLatin1String("500"));
+ le->setValidator(new QIntValidator());
+ iface->setText(QAccessible::Value, 0, QLatin1String("This text is not a number"));
+ QCOMPARE(le->text(), QLatin1String("500"));
+
delete iface;
delete le;
delete le2;
+ QTestAccessibility::clearEvents();
+
+ // IA2
+ QString cite = "I always pass on good advice. It is the only thing to do with it. It is never of any use to oneself. --Oscar Wilde";
+ QLineEdit *le3 = new QLineEdit(cite, toplevel);
+ iface = QAccessible::queryAccessibleInterface(le3);
+ QAccessibleTextInterface* textIface = iface->textInterface();
+ le3->deselect();
+ le3->setCursorPosition(3);
+ QCOMPARE(textIface->cursorPosition(), 3);
+ QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le3, 0, QAccessible::TextCaretMoved)));
+ QCOMPARE(textIface->selectionCount(), 0);
+ 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);
+ QCOMPARE(end, 1);
+ QCOMPARE(textIface->textBeforeOffset(0, QAccessible2::CharBoundary,&start,&end), QString());
+ QCOMPARE(textIface->textAfterOffset(0, QAccessible2::CharBoundary,&start,&end), QString::fromLatin1(" "));
+ QCOMPARE(start, 1);
+ QCOMPARE(end, 2);
+
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::CharBoundary,&start,&end), QString::fromLatin1("a"));
+ QCOMPARE(start, 5);
+ QCOMPARE(end, 6);
+ QCOMPARE(textIface->textBeforeOffset(5, QAccessible2::CharBoundary,&start,&end), QString::fromLatin1("w"));
+ QCOMPARE(textIface->textAfterOffset(5, QAccessible2::CharBoundary,&start,&end), QString::fromLatin1("y"));
+
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1("always"));
+ QCOMPARE(start, 2);
+ QCOMPARE(end, 8);
+
+ QCOMPARE(textIface->textAtOffset(2, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1("always"));
+ QCOMPARE(textIface->textAtOffset(7, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1("always"));
+ QCOMPARE(textIface->textAtOffset(8, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1(" "));
+ QCOMPARE(textIface->textAtOffset(25, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1("advice"));
+ QCOMPARE(textIface->textAtOffset(92, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1("oneself"));
+
+ QCOMPARE(textIface->textBeforeOffset(5, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1(" "));
+ QCOMPARE(textIface->textAfterOffset(5, QAccessible2::WordBoundary,&start,&end), QString::fromLatin1(" "));
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::SentenceBoundary,&start,&end), QString::fromLatin1("I always pass on good advice. "));
+ QCOMPARE(start, 0);
+ QCOMPARE(end, 30);
+
+ QCOMPARE(textIface->textBeforeOffset(40, QAccessible2::SentenceBoundary,&start,&end), QString::fromLatin1("I always pass on good advice. "));
+ QCOMPARE(textIface->textAfterOffset(5, QAccessible2::SentenceBoundary,&start,&end), QString::fromLatin1("It is the only thing to do with it. "));
+
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::ParagraphBoundary,&start,&end), cite);
+ QCOMPARE(start, 0);
+ QCOMPARE(end, cite.length());
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::LineBoundary,&start,&end), cite);
+ QCOMPARE(textIface->textAtOffset(5, QAccessible2::NoBoundary,&start,&end), cite);
+
+ delete iface;
delete toplevel;
QTestAccessibility::clearEvents();
}
@@ -2435,6 +2575,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);
@@ -2474,6 +2617,7 @@ void tst_QAccessibility::tableWidgetTest()
delete topLevel;
}
QTestAccessibility::clearEvents();
+#endif
}
class QtTestTableModel: public QAbstractTableModel
@@ -2556,6 +2700,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();
@@ -2635,6 +2782,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()
@@ -2851,6 +3323,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);
@@ -2908,6 +3383,7 @@ void tst_QAccessibility::treeWidgetTest()
delete w;
QTestAccessibility::clearEvents();
+#endif
}
void tst_QAccessibility::labelTest()
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 86c3445d5b..137438b3ef 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -2487,6 +2487,10 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
int selection;
GET_SELECTION(selection);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20753 QCursor::setPos doesn't work for qpa", Abort);
+#endif
+
//since we moved the mouse is in the middle it should even be around 5;
QVERIFY(selection > 3);
diff --git a/tests/auto/qcssparser/tst_qcssparser.cpp b/tests/auto/qcssparser/tst_qcssparser.cpp
index 23cb9e73f2..1e82431a48 100644
--- a/tests/auto/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/qcssparser/tst_qcssparser.cpp
@@ -1590,6 +1590,14 @@ void tst_QCssParser::extractFontFamily()
QFont fnt;
extractor.extractFont(&fnt, &adjustment);
QFontInfo info(fnt);
+
+#ifdef Q_WS_QPA
+ // Note, we have to QSKIP rather than QEXPECT_FAIL because font lookup is broken
+ // such that it may work or not work depending on the order in which fonts were
+ // loaded from disk
+ QSKIP("QTBUG-20986 may fail on qpa", SkipSingle);
+#endif
+
QTEST(info.family(), "expectedFamily");
}
diff --git a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
index e06e3a8b26..6490bfe973 100644
--- a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
@@ -113,6 +113,10 @@ private slots:
void serviceRegistrationRaceCondition();
+ void registerVirtualObject();
+ void callVirtualObject();
+ void callVirtualObjectLocal();
+
public:
QString serviceName() const { return "com.trolltech.Qt.Autotests.QDBusConnection"; }
bool callMethod(const QDBusConnection &conn, const QString &path);
@@ -823,7 +827,6 @@ bool tst_QDBusConnection::callMethod(const QDBusConnection &conn, const QString
{
QDBusMessage msg = QDBusMessage::createMethodCall(conn.baseService(), path, "", "method");
QDBusMessage reply = conn.call(msg, QDBus::Block/*WithGui*/);
-
if (reply.type() != QDBusMessage::ReplyMessage)
return false;
if (MyObject::path == path) {
@@ -1098,6 +1101,203 @@ void tst_QDBusConnection::serviceRegistrationRaceCondition()
QCOMPARE(recv.count, 1);
}
+class VirtualObject: public QDBusVirtualObject
+{
+ Q_OBJECT
+public:
+ VirtualObject() :success(true) {}
+
+ QString introspect(const QString &path) const
+ {
+ return QString();
+ }
+
+ bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection) {
+ ++callCount;
+ lastMessage = message;
+
+ if (success) {
+ QDBusMessage reply = message.createReply(replyArguments);
+ connection.send(reply);
+ }
+ emit messageReceived(message);
+ return success;
+ }
+signals:
+ void messageReceived(const QDBusMessage &message) const;
+
+public:
+ mutable QDBusMessage lastMessage;
+ QVariantList replyArguments;
+ mutable int callCount;
+ bool success;
+};
+
+
+void tst_QDBusConnection::registerVirtualObject()
+{
+ QDBusConnection con = QDBusConnection::sessionBus();
+ QVERIFY(con.isConnected());
+
+ QString path = "/tree/node";
+ QString childPath = "/tree/node/child";
+ QString childChildPath = "/tree/node/child/another";
+
+ {
+ // Register VirtualObject that handles child paths. Unregister by going out of scope.
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(&obj));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(&obj));
+ QCOMPARE(con.objectRegisteredAt(childChildPath), static_cast<QObject *>(&obj));
+ }
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(0));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(0));
+
+ {
+ // Register VirtualObject that handles child paths. Unregister by calling unregister.
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(&obj));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(&obj));
+ QCOMPARE(con.objectRegisteredAt(childChildPath), static_cast<QObject *>(&obj));
+ con.unregisterObject(path);
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(0));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(0));
+ }
+
+ {
+ // Single node has no sub path handling.
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SingleNode));
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(&obj));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(0));
+ }
+
+ {
+ // Register VirtualObject that handles child paths. Try to register an object on a child path of that.
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(&obj));
+
+ QObject objectAtSubPath;
+ QVERIFY(!con.registerObject(path, &objectAtSubPath));
+ QVERIFY(!con.registerObject(childPath, &objectAtSubPath));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(&obj));
+ }
+
+ {
+ // Register object, make sure no SubPath handling object can be registered on a parent path.
+ QObject objectAtSubPath;
+ QVERIFY(con.registerObject(childPath, &objectAtSubPath));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(&objectAtSubPath));
+
+ VirtualObject obj;
+ QVERIFY(!con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(0));
+ }
+ QCOMPARE(con.objectRegisteredAt(path), static_cast<QObject *>(0));
+ QCOMPARE(con.objectRegisteredAt(childPath), static_cast<QObject *>(0));
+ QCOMPARE(con.objectRegisteredAt(childChildPath), static_cast<QObject *>(0));
+}
+
+void tst_QDBusConnection::callVirtualObject()
+{
+ QDBusConnection con = QDBusConnection::sessionBus();
+ QVERIFY(con.isConnected());
+
+ QDBusConnection con2 = QDBusConnection::connectToBus(QDBusConnection::SessionBus, "con2");
+
+ QString path = "/tree/node";
+ QString childPath = "/tree/node/child";
+
+ // register one object at root:
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ obj.callCount = 0;
+ obj.replyArguments << 42 << 47u;
+
+ QObject::connect(&obj, SIGNAL(messageReceived(QDBusMessage)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ QDBusMessage message = QDBusMessage::createMethodCall(con.baseService(), path, QString(), "hello");
+ QDBusPendingCall reply = con2.asyncCall(message);
+
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(obj.callCount, 1);
+ QCOMPARE(obj.lastMessage.service(), con2.baseService());
+ QCOMPARE(obj.lastMessage.interface(), QString());
+ QCOMPARE(obj.lastMessage.path(), path);
+ reply.waitForFinished();
+ QVERIFY(reply.isValid());
+ QCOMPARE(reply.reply().arguments(), obj.replyArguments);
+
+ // call sub path
+ QDBusMessage childMessage = QDBusMessage::createMethodCall(con.baseService(), childPath, QString(), "helloChild");
+ obj.replyArguments.clear();
+ obj.replyArguments << 99;
+ QDBusPendingCall childReply = con2.asyncCall(childMessage);
+
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(obj.callCount, 2);
+ QCOMPARE(obj.lastMessage.service(), con2.baseService());
+ QCOMPARE(obj.lastMessage.interface(), QString());
+ QCOMPARE(obj.lastMessage.path(), childPath);
+
+ childReply.waitForFinished();
+ QVERIFY(childReply.isValid());
+ QCOMPARE(childReply.reply().arguments(), obj.replyArguments);
+
+ // let the call fail by having the virtual object return false
+ obj.success = false;
+ QDBusMessage errorMessage = QDBusMessage::createMethodCall(con.baseService(), childPath, QString(), "someFunc");
+ QDBusPendingCall errorReply = con2.asyncCall(errorMessage);
+
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QTest::qWait(100);
+ QVERIFY(errorReply.isError());
+ qDebug() << errorReply.reply().arguments();
+ QCOMPARE(errorReply.reply().errorName(), QString("org.freedesktop.DBus.Error.UnknownObject"));
+
+ QDBusConnection::disconnectFromBus("con2");
+}
+
+void tst_QDBusConnection::callVirtualObjectLocal()
+{
+ QDBusConnection con = QDBusConnection::sessionBus();
+ QVERIFY(con.isConnected());
+
+ QString path = "/tree/node";
+ QString childPath = "/tree/node/child";
+
+ // register one object at root:
+ VirtualObject obj;
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+ obj.callCount = 0;
+ obj.replyArguments << 42 << 47u;
+
+ QDBusMessage message = QDBusMessage::createMethodCall(con.baseService(), path, QString(), "hello");
+ QDBusMessage reply = con.call(message, QDBus::Block, 5000);
+ QCOMPARE(obj.callCount, 1);
+ QCOMPARE(obj.lastMessage.service(), con.baseService());
+ QCOMPARE(obj.lastMessage.interface(), QString());
+ QCOMPARE(obj.lastMessage.path(), path);
+ QCOMPARE(obj.replyArguments, reply.arguments());
+
+ obj.replyArguments << QString("alien abduction");
+ QDBusMessage subPathMessage = QDBusMessage::createMethodCall(con.baseService(), childPath, QString(), "hello");
+ QDBusMessage subPathReply = con.call(subPathMessage , QDBus::Block, 5000);
+ QCOMPARE(obj.callCount, 2);
+ QCOMPARE(obj.lastMessage.service(), con.baseService());
+ QCOMPARE(obj.lastMessage.interface(), QString());
+ QCOMPARE(obj.lastMessage.path(), childPath);
+ QCOMPARE(obj.replyArguments, subPathReply.arguments());
+}
+
QString MyObject::path;
QTEST_MAIN(tst_QDBusConnection)
diff --git a/tests/auto/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
index 96ab3113f3..9156818158 100644
--- a/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
+++ b/tests/auto/qdbusinterface/tst_qdbusinterface.cpp
@@ -200,6 +200,7 @@ private slots:
void invalidAfterServiceOwnerChanged();
void introspect();
void introspectUnknownTypes();
+ void introspectVirtualObject();
void callMethod();
void invokeMethod();
void invokeMethodWithReturn();
@@ -361,7 +362,6 @@ void tst_QDBusInterface::invalidAfterServiceOwnerChanged()
void tst_QDBusInterface::introspect()
{
- QDBusConnection con = QDBusConnection::sessionBus();
QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/"),
TEST_INTERFACE_NAME);
@@ -394,6 +394,75 @@ void tst_QDBusInterface::introspectUnknownTypes()
QVERIFY(mo->indexOfProperty("prop1") != -1);
int pidx = mo->indexOfProperty("prop1");
QCOMPARE(mo->property(pidx).typeName(), "QDBusRawType<0x7e>*");
+
+
+
+ QDBusMessage message = QDBusMessage::createMethodCall(con.baseService(), "/unknownTypes", "org.freedesktop.DBus.Introspectable", "Introspect");
+ QDBusMessage reply = con.call(message, QDBus::Block, 5000);
+ qDebug() << "REPL: " << reply.arguments();
+
+}
+
+
+class VirtualObject: public QDBusVirtualObject
+{
+ Q_OBJECT
+public:
+ VirtualObject() :success(true) {}
+
+ QString introspect(const QString &path) const {
+ if (path == "/some/path/superNode")
+ return "zitroneneis";
+ if (path == "/some/path/superNode/foo")
+ return " <interface name=\"com.trolltech.QtDBus.VirtualObject\">\n"
+ " <method name=\"klingeling\" />\n"
+ " </interface>\n" ;
+ return QString();
+ }
+
+ bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection) {
+ ++callCount;
+ lastMessage = message;
+
+ if (success) {
+ QDBusMessage reply = message.createReply(replyArguments);
+ connection.send(reply);
+ }
+ emit messageReceived(message);
+ return success;
+ }
+signals:
+ void messageReceived(const QDBusMessage &message) const;
+
+public:
+ mutable QDBusMessage lastMessage;
+ QVariantList replyArguments;
+ mutable int callCount;
+ bool success;
+};
+
+void tst_QDBusInterface::introspectVirtualObject()
+{
+ QDBusConnection con = QDBusConnection::sessionBus();
+ QVERIFY(con.isConnected());
+ VirtualObject obj;
+
+ obj.success = false;
+
+ QString path = "/some/path/superNode";
+ QVERIFY(con.registerVirtualObject(path, &obj, QDBusConnection::SubPath));
+
+ QDBusMessage message = QDBusMessage::createMethodCall(con.baseService(), path, "org.freedesktop.DBus.Introspectable", "Introspect");
+ QDBusMessage reply = con.call(message, QDBus::Block, 5000);
+ QVERIFY(reply.arguments().at(0).toString().contains(
+ QRegExp("<node>.*zitroneneis.*<interface name=") ));
+
+ QDBusMessage message2 = QDBusMessage::createMethodCall(con.baseService(), path + "/foo", "org.freedesktop.DBus.Introspectable", "Introspect");
+ QDBusMessage reply2 = con.call(message2, QDBus::Block, 5000);
+ QVERIFY(reply2.arguments().at(0).toString().contains(
+ QRegExp("<node>.*<interface name=\"com.trolltech.QtDBus.VirtualObject\">"
+ ".*<method name=\"klingeling\" />\n"
+ ".*</interface>.*<interface name=") ));
}
void tst_QDBusInterface::callMethod()
diff --git a/tests/auto/qeventloop/qeventloop.pro b/tests/auto/qeventloop/qeventloop.pro
index 153cdbafe7..e3c170a33b 100644
--- a/tests/auto/qeventloop/qeventloop.pro
+++ b/tests/auto/qeventloop/qeventloop.pro
@@ -6,5 +6,3 @@ QT += network
win32:!wince*:LIBS += -luser32
symbian:TARGET.CAPABILITY += NetworkServices
-
-CONFIG+=insignificant_test
diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
index 828366ba49..a702908549 100644
--- a/tests/auto/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/qeventloop/tst_qeventloop.cpp
@@ -203,6 +203,7 @@ private slots:
void symbianNestedActiveSchedulerLoop();
void processEvents();
void exec();
+ void throwInExec();
void reexec();
void exit();
void execAfterExit();
@@ -445,14 +446,35 @@ void tst_QEventLoop::exec()
QCOMPARE(returnCode, 0);
QCOMPARE(executor.returnCode, -1);
}
+}
-#if !defined(QT_NO_EXCEPTIONS) && !defined(Q_OS_WINCE_WM) && !defined(Q_OS_SYMBIAN) && !defined(NO_EVENTLOOP_EXCEPTIONS)
+void tst_QEventLoop::throwInExec()
+{
+#if defined(QT_NO_EXCEPTIONS) || defined(NO_EVENTLOOP_EXCEPTIONS)
+ QSKIP("Exceptions are disabled", SkipAll);
+#elif defined(Q_OS_WINCE_WM) || defined(Q_OS_SYMBIAN)
// Windows Mobile cannot handle cross library exceptions
// qobject.cpp will try to rethrow the exception after handling
// which causes gwes.exe to crash
// Symbian doesn't propagate exceptions from eventloop, but converts them to
// CActiveScheduler errors instead -> this test will hang.
+ QSKIP("This platform doesn't support propagating exceptions through the event loop", SkipAll);
+#elif defined(Q_OS_LINUX)
+ // C++ exceptions can't be passed through glib callbacks. Skip the test if
+ // we're using the glib event loop.
+ QByteArray dispatcher = QAbstractEventDispatcher::instance()->metaObject()->className();
+ if (dispatcher.contains("Glib")) {
+ QSKIP(
+ qPrintable(QString(
+ "Throwing exceptions in exec() won't work if %1 event dispatcher is used.\n"
+ "Try running with QT_NO_GLIB=1 in environment."
+ ).arg(QString::fromLatin1(dispatcher))),
+ SkipAll
+ );
+ }
+#endif
+
{
// QEventLoop::exec() is exception safe
QEventLoop eventLoop;
@@ -474,7 +496,6 @@ void tst_QEventLoop::exec()
}
QCOMPARE(caughtExceptions, 2);
}
-#endif
}
void tst_QEventLoop::reexec()
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index 3bb682c7e9..d9fd736e09 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -80,7 +80,9 @@
# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
#elif defined(Q_OS_UNIX)
#ifdef QT_BUILD_INTERNAL
+QT_BEGIN_NAMESPACE
extern Q_GUI_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded = 0);
+QT_END_NAMESPACE
#endif
#endif
diff --git a/tests/auto/qfocusevent/qfocusevent.pro b/tests/auto/qfocusevent/qfocusevent.pro
index 85140ad9e1..e709a547ec 100644
--- a/tests/auto/qfocusevent/qfocusevent.pro
+++ b/tests/auto/qfocusevent/qfocusevent.pro
@@ -2,4 +2,4 @@ load(qttest_p4)
QT += widgets
SOURCES += tst_qfocusevent.cpp
-mac*:CONFIG+=insignificant_test
+CONFIG+=insignificant_test
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp
index 711ffc0b53..a564e71e19 100644
--- a/tests/auto/qfont/tst_qfont.cpp
+++ b/tests/auto/qfont/tst_qfont.cpp
@@ -604,8 +604,8 @@ void tst_QFont::serializeSpacing()
void tst_QFont::lastResortFont()
{
-#ifdef Q_WS_QWS
- QSKIP("QFont::lastResortFont() may abort with qFatal() on QWS", SkipAll);
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
+ QSKIP("QFont::lastResortFont() may abort with qFatal() on QWS/QPA", SkipAll);
// ...if absolutely no font is found. Just as ducumented for QFont::lastResortFont().
// This happens on our CI machines which run QWS autotests.
#endif
diff --git a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
index 735c7e4350..1df61d0a06 100644
--- a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
@@ -160,6 +160,13 @@ void tst_QFontDatabase::fixedPitch()
if (!fdb.families().contains(font))
QSKIP( "Font not installed", SkipSingle);
+#ifdef Q_WS_QPA
+ if (fixedPitch) {
+ // fixedPitch() never returns true on qpa
+ QEXPECT_FAIL("", "QTBUG-20754 fails on qpa", Abort);
+ }
+#endif
+
QCOMPARE(fdb.isFixedPitch(font), fixedPitch);
QFont qfont(font);
@@ -229,6 +236,10 @@ void tst_QFontDatabase::addAppFont()
QFontDatabase db;
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("memory font", "QTBUG-20754 fails on qpa", Abort);
+#endif
+
const QStringList oldFamilies = db.families();
QVERIFY(!oldFamilies.isEmpty());
@@ -262,6 +273,10 @@ void tst_QFontDatabase::addAppFont()
const QStringList addedFamilies = QFontDatabase::applicationFontFamilies(id);
QVERIFY(!addedFamilies.isEmpty());
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("font file", "QTBUG-20754 fails on qpa", Abort);
+#endif
+
const QStringList newFamilies = db.families();
QVERIFY(!newFamilies.isEmpty());
QVERIFY(newFamilies.count() >= oldFamilies.count());
diff --git a/tests/auto/qfontdialog/qfontdialog.pro b/tests/auto/qfontdialog/qfontdialog.pro
index 60320476e2..e4ad2f1a41 100644
--- a/tests/auto/qfontdialog/qfontdialog.pro
+++ b/tests/auto/qfontdialog/qfontdialog.pro
@@ -9,3 +9,5 @@ mac:!qpa {
OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm
LIBS += -framework Cocoa
}
+
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index 1df194d020..982cfc11d9 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -277,12 +277,20 @@ void tst_QFontMetrics::inFontUcs4()
{
QFontMetrics fm(font);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20759 fails for qpa", Continue);
+#endif
+
QVERIFY(fm.inFontUcs4(0x1D7FF));
}
{
QFontMetricsF fm(font);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20759 fails for qpa", Continue);
+#endif
+
QVERIFY(fm.inFontUcs4(0x1D7FF));
}
@@ -303,6 +311,11 @@ void tst_QFontMetrics::lineWidth()
const QFontMetrics bigFontMetrics(bigFont);
QVERIFY(smallFontMetrics.lineWidth() >= 1);
+
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20759 fails for qpa", Continue);
+#endif
+
QVERIFY(smallFontMetrics.lineWidth() < bigFontMetrics.lineWidth());
}
diff --git a/tests/auto/qftp/qftp.pro b/tests/auto/qftp/qftp.pro
index 69f89572ba..8f63d6e26e 100644
--- a/tests/auto/qftp/qftp.pro
+++ b/tests/auto/qftp/qftp.pro
@@ -18,3 +18,5 @@ wince*: {
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+
+CONFIG+=insignificant_test # uses live qt-test-server, inherently unstable
diff --git a/tests/auto/qglthreads/tst_qglthreads.cpp b/tests/auto/qglthreads/tst_qglthreads.cpp
index 859f47f000..472379ab7a 100644
--- a/tests/auto/qglthreads/tst_qglthreads.cpp
+++ b/tests/auto/qglthreads/tst_qglthreads.cpp
@@ -46,7 +46,6 @@
#include "tst_qglthreads.h"
#ifdef Q_OS_SYMBIAN
-#include <unistd.h> // for usleep
#define RUNNING_TIME 2000 // save GPU mem by running shorter time.
#else
#define RUNNING_TIME 5000
@@ -467,11 +466,7 @@ void tst_QGLThreads::renderInThread()
qApp->processEvents();
value = -value;
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!thread.failure);
@@ -574,11 +569,7 @@ public slots:
p.drawText(rect.center(), "This is a piece of text");
p.end();
rotAngle += 2;
-#ifdef Q_WS_WIN
- Sleep(20);
-#else
- usleep(20 * 1000);
-#endif
+ QThread::msleep(20);
}
fail = beginFailed;
@@ -670,11 +661,7 @@ void tst_QGLThreads::painterOnGLWidgetInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -693,11 +680,7 @@ void tst_QGLThreads::painterOnPixmapInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -726,11 +709,7 @@ void tst_QGLThreads::painterOnPboInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -760,11 +739,7 @@ void tst_QGLThreads::painterOnFboInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
diff --git a/tests/auto/qglyphrun/tst_qglyphrun.cpp b/tests/auto/qglyphrun/tst_qglyphrun.cpp
index a18a2ac8dd..e84915428f 100644
--- a/tests/auto/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/qglyphrun/tst_qglyphrun.cpp
@@ -55,6 +55,7 @@ class tst_QGlyphRun: public QObject
#if !defined(QT_NO_RAWFONT)
private slots:
void initTestCase();
+ void init();
void cleanupTestCase();
void constructionAndDestruction();
@@ -78,6 +79,7 @@ private slots:
private:
int m_testFontId;
QFont m_testFont;
+ bool m_testFont_ok;
#endif // QT_NO_RAWFONT
};
@@ -88,12 +90,27 @@ Q_DECLARE_METATYPE(QGlyphRun);
void tst_QGlyphRun::initTestCase()
{
+ m_testFont_ok = false;
+
m_testFontId = QFontDatabase::addApplicationFont(SRCDIR "test.ttf");
QVERIFY(m_testFontId >= 0);
m_testFont = QFont("QtsSpecialTestFont");
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20760 fails on qpa", Abort);
+#endif
+
QCOMPARE(QFontInfo(m_testFont).family(), QString::fromLatin1("QtsSpecialTestFont"));
+
+ m_testFont_ok = true;
+}
+
+void tst_QGlyphRun::init()
+{
+ if (!m_testFont_ok) {
+ QSKIP("Test font is not working correctly", SkipAll);
+ }
}
void tst_QGlyphRun::cleanupTestCase()
@@ -237,6 +254,7 @@ void tst_QGlyphRun::textLayoutGlyphIndexes()
layout.endLayout();
QList<QGlyphRun> listOfGlyphs = layout.glyphRuns();
+
QCOMPARE(listOfGlyphs.size(), 1);
QGlyphRun glyphs = listOfGlyphs.at(0);
diff --git a/tests/auto/qgraphicseffect/qgraphicseffect.pro b/tests/auto/qgraphicseffect/qgraphicseffect.pro
index 171ab3ffda..d0d1f11d0c 100644
--- a/tests/auto/qgraphicseffect/qgraphicseffect.pro
+++ b/tests/auto/qgraphicseffect/qgraphicseffect.pro
@@ -5,3 +5,5 @@ QT += core-private gui-private
SOURCES += tst_qgraphicseffect.cpp
CONFIG += parallel_test
+
+qpa:CONFIG+=insignificant_test # QTBUG-20761
diff --git a/tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro b/tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro
index f0e9a4b0f8..7db7c1ae6f 100644
--- a/tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro
+++ b/tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro
@@ -3,4 +3,4 @@ load(qttest_p4)
QT += widgets
SOURCES += tst_qgraphicsgridlayout.cpp
CONFIG += parallel_test
-
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qgraphicsitem/qgraphicsitem.pro b/tests/auto/qgraphicsitem/qgraphicsitem.pro
index bfcf87721f..51a4426680 100644
--- a/tests/auto/qgraphicsitem/qgraphicsitem.pro
+++ b/tests/auto/qgraphicsitem/qgraphicsitem.pro
@@ -6,4 +6,4 @@ DEFINES += QT_NO_CAST_TO_ASCII
win32:!wince*: LIBS += -lUser32
-
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 9e90a9f03c..79dd2bdd7d 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -474,6 +474,7 @@ private slots:
void QTBUG_12112_focusItem();
void QTBUG_13473_sceneposchange();
void QTBUG_16374_crashInDestructor();
+ void QTBUG_20699_focusScopeCrash();
private:
QList<QGraphicsItem *> paintedItems;
@@ -11256,5 +11257,36 @@ void tst_QGraphicsItem::QTBUG_16374_crashInDestructor()
QTest::qWaitForWindowShown(&view);
}
+void tst_QGraphicsItem::QTBUG_20699_focusScopeCrash()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsPixmapItem fs;
+ fs.setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable);
+ scene.addItem(&fs);
+ QGraphicsPixmapItem* fs2 = new QGraphicsPixmapItem(&fs);
+ fs2->setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable);
+ QGraphicsPixmapItem* fi2 = new QGraphicsPixmapItem(&fs);
+ fi2->setFlags(QGraphicsItem::ItemIsFocusable);
+ QGraphicsPixmapItem* fi = new QGraphicsPixmapItem(fs2);
+ fi->setFlags(QGraphicsItem::ItemIsFocusable);
+ fs.setFocus();
+ fi->setFocus();
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ fi->setParentItem(fi2);
+ fi->setFocus();
+ fs.setFocus();
+ fi->setParentItem(fs2);
+ fi->setFocus();
+ fs2->setFocus();
+ fs.setFocus();
+ fi->setParentItem(fi2);
+ fi->setFocus();
+ fs.setFocus();
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro b/tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro
index abe6c23b14..a649ae1a3c 100644
--- a/tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro
+++ b/tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro
@@ -5,4 +5,4 @@ QT += core-private gui-private
SOURCES += tst_qgraphicsproxywidget.cpp
-
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qgraphicsscene/qgraphicsscene.pro b/tests/auto/qgraphicsscene/qgraphicsscene.pro
index 5b9afe1b1f..9f961a11b8 100644
--- a/tests/auto/qgraphicsscene/qgraphicsscene.pro
+++ b/tests/auto/qgraphicsscene/qgraphicsscene.pro
@@ -20,3 +20,4 @@ wince*:{
}
symbian:TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # Min 1Mb, max 16Mb
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qgraphicstransform/qgraphicstransform.pro b/tests/auto/qgraphicstransform/qgraphicstransform.pro
index 4f9d001717..de7f01f36f 100644
--- a/tests/auto/qgraphicstransform/qgraphicstransform.pro
+++ b/tests/auto/qgraphicstransform/qgraphicstransform.pro
@@ -2,3 +2,5 @@ load(qttest_p4)
QT += widgets
SOURCES += tst_qgraphicstransform.cpp
CONFIG += parallel_test
+
+linux-*:contains(QT_CONFIG,release):DEFINES+=MAY_HIT_QTBUG_20661
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index 7b928909ff..1a116b7f30 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -359,7 +359,7 @@ void tst_QGraphicsTransform::rotation3dArbitraryAxis()
exp.rotate(angle, axis);
QTransform expected = exp.toTransform(1024.0f);
-#ifdef Q_OS_LINUX
+#if defined(MAY_HIT_QTBUG_20661)
// These failures possibly relate to the float vs qreal issue mentioned
// in the comment above fuzzyCompare().
if (sizeof(qreal) == sizeof(double)) {
diff --git a/tests/auto/qgraphicsview/qgraphicsview.pro b/tests/auto/qgraphicsview/qgraphicsview.pro
index 55569e07bd..053093f9bd 100644
--- a/tests/auto/qgraphicsview/qgraphicsview.pro
+++ b/tests/auto/qgraphicsview/qgraphicsview.pro
@@ -7,3 +7,4 @@ SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
DEFINES += QT_NO_CAST_TO_ASCII
symbian:TARGET.EPOCHEAPSIZE = 1000000 10000000
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qgraphicswidget/qgraphicswidget.pro b/tests/auto/qgraphicswidget/qgraphicswidget.pro
index 1dc01f14cf..330076eafc 100644
--- a/tests/auto/qgraphicswidget/qgraphicswidget.pro
+++ b/tests/auto/qgraphicswidget/qgraphicswidget.pro
@@ -7,3 +7,4 @@ SOURCES += tst_qgraphicswidget.cpp
mac*:CONFIG+=insignificant_test
+qpa:contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20778 unstable on qpa, xcb
diff --git a/tests/auto/qgridlayout/tst_qgridlayout.cpp b/tests/auto/qgridlayout/tst_qgridlayout.cpp
index 693236aa9d..d52729a273 100644
--- a/tests/auto/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/qgridlayout/tst_qgridlayout.cpp
@@ -721,10 +721,8 @@ void tst_QGridLayout::spacingsAndMargins()
QSize topsize = toplevel.size();
QSize minimumsize = vbox.totalMinimumSize();
-#if defined(Q_WS_QWS)
if (topsize.width() < minimumsize.width() || topsize.height() < minimumsize.height())
QSKIP("The screen is too small to run this test case", SkipSingle);
-#endif
// We are relying on the order here...
for (int pi = 0; pi < sizehinters.count(); ++pi) {
diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp
index 35c8d8d95c..1c7df1bdae 100644
--- a/tests/auto/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp
@@ -611,7 +611,7 @@ void tst_QHostInfo::resultsReady(const QHostInfo &hi)
lookupDone = true;
lookupResults = hi;
lookupsDoneCounter++;
- QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection);
+ QTestEventLoop::instance().exitLoop();
}
void tst_QHostInfo::abortHostLookup()
diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 98511ac86e..1ce5d8a092 100644
--- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -9,3 +9,5 @@ symbian: TARGET.CAPABILITY = NetworkServices
symbian: {
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
}
+
+CONFIG+=insignificant_test # QTBUG-20981, crashes sometimes
diff --git a/tests/auto/qlistview/qlistview.pro b/tests/auto/qlistview/qlistview.pro
index 6d004fcfc4..cba2ef1170 100644
--- a/tests/auto/qlistview/qlistview.pro
+++ b/tests/auto/qlistview/qlistview.pro
@@ -3,4 +3,4 @@ QT += widgets
SOURCES += tst_qlistview.cpp
win32:!wince*: LIBS += -luser32
-
+qpa:contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index b3c41e1c2b..73a74c6d75 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -827,6 +827,9 @@ void tst_QMenu::task258920_mouseBorder()
#ifdef Q_OS_WINCE_WM
QSKIP("Mouse move related signals for Windows Mobile unavailable", SkipAll);
#endif
+#ifdef Q_WS_QPA
+ QSKIP("QTBUG-20753 QCursor::setPos() / QTest::mouseMove() doesn't work on qpa", SkipAll);
+#endif
Menu258920 menu;
// On Symbian, styleHint(QStyle::SH_Menu_MouseTracking) in QS60Style is false.
// For other styles which inherit from QWindowsStyle, the value is true.
@@ -880,12 +883,27 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow()
b.show();
const QRect screen = QApplication::desktop()->screenGeometry(scrNumber);
- b.move(10, screen.bottom()-b.height()-5);
+ QRect desiredGeometry = b.geometry();
+ desiredGeometry.moveTopLeft(QPoint(10, screen.bottom()-b.height()-5));
+
+ b.setGeometry(desiredGeometry);
QTest::qWaitForWindowShown(&b);
+
+ if (b.geometry() != desiredGeometry) {
+ // We are trying to put the button very close to the edge of the screen,
+ // explicitly to test behavior when the popup menu goes off the screen.
+ // However a modern window manager is quite likely to reject this requested geometry
+ // (kwin in kde4 does, for example, since the button would probably appear behind
+ // or partially behind the taskbar).
+ // Your best bet is to run this test _without_ a WM.
+ QSKIP("Your window manager won't allow a window against the bottom of the screen", SkipAll);
+ }
+
QTimer::singleShot(300,lastMenu, SLOT(hide()));
QTest::mouseClick(&b, Qt::LeftButton, Qt::NoModifier, b.rect().center());
QVERIFY(!lastMenu->geometry().intersects(b.geometry()));
+ // note: we're assuming that, if we previously got the desired geometry, we'll get it here too
b.move(10, screen.bottom()-lastMenu->height()-5);
QTimer::singleShot(300,lastMenu, SLOT(hide()));
QTest::mouseClick(&b, Qt::LeftButton, Qt::NoModifier, b.rect().center());
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp
index 51bb43716e..e1b7f1ff9b 100644
--- a/tests/auto/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/qmenubar/tst_qmenubar.cpp
@@ -344,6 +344,9 @@ void tst_QMenuBar::accel()
// create a popup menu with menu items set the accelerators later...
initSimpleMenubar();
+
+ // shortcuts won't work unless the window is active
+ QTRY_VERIFY( QApplication::activeWindow() );
// QTest::keyClick( 0, Qt::Key_A, AltKey );
QTest::keyClick( 0, Qt::Key_A, Qt::ControlModifier );
QTest::qWait(300);
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index 99942d54be..3cd4376d80 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -689,6 +689,101 @@ void tst_QObject::findChildren()
tl = o.findChildren<QTimer *>("t1");
QCOMPARE(tl.size(), 1);
QCOMPARE(tl.at(0), &t1);
+
+ // Find direct child/children
+
+ op = o.findChild<QObject*>("o1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, &o1);
+ op = o.findChild<QObject*>("o2", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, &o2);
+ op = o.findChild<QObject*>("o11", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("o12", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("o111", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("t1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(&t1));
+ op = o.findChild<QObject*>("t121", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QTimer*>("t1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(&t1));
+ op = o.findChild<QTimer*>("t121", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QTimer*>("o12", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("o", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("harry", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+ op = o.findChild<QObject*>("o1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, &o1);
+
+ l = o.findChildren<QObject*>("o1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 1);
+ QCOMPARE(l.at(0), &o1);
+ l = o.findChildren<QObject*>("o2", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 1);
+ QCOMPARE(l.at(0), &o2);
+ l = o.findChildren<QObject*>("o11", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ l = o.findChildren<QObject*>("o12", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ l = o.findChildren<QObject*>("o111", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ l = o.findChildren<QObject*>("t1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 1);
+ QCOMPARE(l.at(0), static_cast<QObject *>(&t1));
+ l = o.findChildren<QObject*>("t121", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ tl = o.findChildren<QTimer*>("t1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 1);
+ QCOMPARE(tl.at(0), &t1);
+ tl = o.findChildren<QTimer*>("t121", Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 0);
+ l = o.findChildren<QObject*>("o", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ l = o.findChildren<QObject*>("harry", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+ tl = o.findChildren<QTimer*>("o12", Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 0);
+ l = o.findChildren<QObject*>("o1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 1);
+ QCOMPARE(l.at(0), &o1);
+
+ l = o.findChildren<QObject*>(QRegExp("o.*"), Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 2);
+ QVERIFY(l.contains(&o1));
+ QVERIFY(l.contains(&o2));
+ l = o.findChildren<QObject*>(QRegExp("t.*"), Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 1);
+ QVERIFY(l.contains(&t1));
+ tl = o.findChildren<QTimer*>(QRegExp(".*"), Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 2);
+ QVERIFY(tl.contains(&t1));
+ tl = o.findChildren<QTimer*>(QRegExp("o.*"), Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 0);
+ l = o.findChildren<QObject*>(QRegExp("harry"), Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+
+ // empty and null string check
+ op = o.findChild<QObject*>(QString(), Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, &o1);
+ op = o.findChild<QObject*>("", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, &unnamed);
+ op = o.findChild<QObject*>("unnamed", Qt::FindDirectChildrenOnly);
+ QCOMPARE(op, static_cast<QObject *>(0));
+
+ l = o.findChildren<QObject*>(QString(), Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 5);
+ l = o.findChildren<QObject*>("", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 2);
+ l = o.findChildren<QObject*>("unnamed", Qt::FindDirectChildrenOnly);
+ QCOMPARE(l.size(), 0);
+
+ tl = o.findChildren<QTimer *>("t1", Qt::FindDirectChildrenOnly);
+ QCOMPARE(tl.size(), 1);
+ QCOMPARE(tl.at(0), &t1);
}
diff --git a/tests/auto/qpainter/qpainter.pro b/tests/auto/qpainter/qpainter.pro
index 3660da3e39..00307d3e58 100644
--- a/tests/auto/qpainter/qpainter.pro
+++ b/tests/auto/qpainter/qpainter.pro
@@ -17,3 +17,4 @@ wince* {
mac*:CONFIG+=insignificant_test
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 3941a11460..33315adc06 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -114,6 +114,8 @@ private slots:
void connectPathMoveTo();
void translate();
+
+ void lineWithinBounds();
};
// Testing get/set functions
@@ -1306,6 +1308,25 @@ void tst_QPainterPath::translate()
QCOMPARE(complexPath.translated(-offset), untranslatedComplexPath);
}
+
+void tst_QPainterPath::lineWithinBounds()
+{
+ const int iteration_count = 3;
+ volatile const qreal yVal = 0.5;
+ QPointF a(0.0, yVal);
+ QPointF b(1000.0, yVal);
+ QPointF c(2000.0, yVal);
+ QPointF d(3000.0, yVal);
+ QPainterPath path;
+ path.moveTo(QPointF(0, yVal));
+ path.cubicTo(QPointF(1000.0, yVal), QPointF(2000.0, yVal), QPointF(3000.0, yVal));
+ for(int i=0; i<=iteration_count; i++) {
+ qreal actual = path.pointAtPercent(qreal(i) / iteration_count).y();
+ QVERIFY(actual == yVal); // don't use QCOMPARE, don't want fuzzy comparison
+ }
+}
+
+
QTEST_APPLESS_MAIN(tst_QPainterPath)
#include "tst_qpainterpath.moc"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 1365f080cc..38858e5503 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -800,6 +800,9 @@ void tst_QPixmap::grabWidget()
void tst_QPixmap::grabWindow()
{
+#ifdef Q_WS_QPA
+ QSKIP("QTBUG-20863 grabWindow is broken on most qpa backends", SkipAll);
+#endif
#ifdef Q_OS_WINCE
// We get out of memory, if the desktop itself is too big.
if (QApplication::desktop()->width() <= 480)
@@ -1257,6 +1260,9 @@ void tst_QPixmap::toSymbianCFbsBitmap()
void tst_QPixmap::onlyNullPixmapsOutsideGuiThread()
{
+#ifdef Q_WS_QPA
+ QSKIP("QTBUG-20864 can't determine if threaded pixmaps are available for qpa", SkipAll);
+#endif
#if !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
class Thread : public QThread
{
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index 99ca6fbd58..a6b6895981 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -423,8 +423,8 @@ void tst_QPrinter::testMargins()
void tst_QPrinter::testNonExistentPrinter()
{
-#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_MAC)
- QSKIP("QPrinter::testNonExistentPrinter() is not relevant for X11/Embedded/Mac", SkipAll);
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_OS_MAC)
+ QSKIP("QPrinter::testNonExistentPrinter() is not relevant for this platform", SkipAll);
#else
QPrinter printer;
QPainter painter;
diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp
index eb78057b5e..1c18f2f1e8 100644
--- a/tests/auto/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/qrawfont/tst_qrawfont.cpp
@@ -49,6 +49,8 @@ class tst_QRawFont: public QObject
Q_OBJECT
#if !defined(QT_NO_RAWFONT)
private slots:
+ void init();
+
void invalidRawFont();
void explicitRawFontNotLoadedInDatabase_data();
@@ -107,6 +109,20 @@ Q_DECLARE_METATYPE(QFont::Style)
Q_DECLARE_METATYPE(QFont::Weight)
Q_DECLARE_METATYPE(QFontDatabase::WritingSystem)
+void tst_QRawFont::init()
+{
+#ifdef Q_WS_QPA
+ // Loading fonts from a QByteArray seems unimplemented for all qpa plugins at time of writing;
+ // almost all testfunctions fail on qpa due to this, except these few:
+ const QByteArray func = QTest::currentTestFunction();
+ if (func != "invalidRawFont"
+ && func != "explicitRawFontNotAvailableInSystem"
+ && func != "fromFont"
+ && func != "textLayout")
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
+}
+
void tst_QRawFont::invalidRawFont()
{
QRawFont font;
@@ -292,6 +308,9 @@ void tst_QRawFont::textLayout()
QString familyName = QString::fromLatin1("QtBidiTestFont");
QFont font(familyName);
font.setPixelSize(18.0);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
QCOMPARE(QFontInfo(font).family(), familyName);
QTextLayout layout(QLatin1String("Foobar"));
@@ -608,6 +627,11 @@ void tst_QRawFont::fromFont()
QRawFont rawFont = QRawFont::fromFont(font, writingSystem);
QVERIFY(rawFont.isValid());
+
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20976 fails on qpa", Abort);
+#endif
+
QCOMPARE(rawFont.familyName(), familyName);
QCOMPARE(rawFont.pixelSize(), 26.0);
diff --git a/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
index c416ec7ccb..77836b4671 100644
--- a/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -294,6 +294,7 @@ void tst_QSocketNotifier::posixSockets()
QTestEventLoop::instance().enterLoop(3);
QCOMPARE(readSpy.count(), 1);
+ QEXPECT_FAIL("", "QTBUG-20982 fails", Abort);
QCOMPARE(writeSpy.count(), 0);
QCOMPARE(errorSpy.count(), 0);
@@ -321,11 +322,13 @@ void tst_QSocketNotifier::bogusFds()
QSocketNotifier max(std::numeric_limits<int>::max(), QSocketNotifier::Read);
QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Invalid socket specified");
#ifndef Q_OS_WIN
- QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
+ // FIXME QTBUG-20982: this fails, and ignoreMessage can't be skipped or QEXPECT_FAILed
+ // QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
#endif
QSocketNotifier min(std::numeric_limits<int>::min(), QSocketNotifier::Write);
#ifndef Q_OS_WIN
- QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
+ // FIXME QTBUG-20982: this fails, and ignoreMessage can't be skipped or QEXPECT_FAILed
+ // QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
#endif
//bogus magic number is the first pseudo socket descriptor from symbian socket engine.
QSocketNotifier bogus(0x40000000, QSocketNotifier::Exception);
diff --git a/tests/auto/qsqlerror/tst_qsqlerror.cpp b/tests/auto/qsqlerror/tst_qsqlerror.cpp
index ad3ef05cda..d02b373c73 100644
--- a/tests/auto/qsqlerror/tst_qsqlerror.cpp
+++ b/tests/auto/qsqlerror/tst_qsqlerror.cpp
@@ -61,6 +61,7 @@ public:
private slots:
void getSetCheck();
void construction();
+ void operators();
};
tst_QSqlError::tst_QSqlError()
@@ -125,5 +126,20 @@ void tst_QSqlError::construction()
QVERIFY(!obj4.isValid());
}
+void tst_QSqlError::operators()
+{
+ QSqlError error1;
+ QSqlError error2;
+ QSqlError error3;
+
+ error1.setType(QSqlError::NoError);
+ error2.setType(QSqlError::NoError);
+ error3.setType(QSqlError::UnknownError);
+
+ QVERIFY(error1 == error2);
+ QVERIFY(error1 != error3);
+}
+
+
QTEST_MAIN(tst_QSqlError)
#include "tst_qsqlerror.moc"
diff --git a/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem b/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem
index bc43c63f21..08176289d7 100644
--- a/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem
+++ b/tests/auto/qsslcertificate/more-certificates/test-cn-two-cns-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority
Validity
- Not Before: Jun 21 21:32:19 2011 GMT
- Not After : Jun 18 21:32:19 2021 GMT
+ Not Before: Jul 31 21:01:17 2011 GMT
+ Not After : Jul 28 21:01:17 2021 GMT
Subject: CN=www.example.com, CN=www2.example.com, ST=Lancashire, C=UK, O=Some organisation
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:b8:b3:72:13:cd:17:2c:01:78:16:62:5d:72:71:
- 33:14:41:be:0c:17:ac:85:db:f8:1e:e8:55:98:3e:
- 7b:46:a5:08:a7:db:0e:dc:78:d8:b7:1e:e0:78:30:
- 6e:b9:e2:43:2e:f2:7d:98:fb:b4:a8:5e:63:42:e8:
- 5c:26:79:20:5e:f6:0e:1d:12:ac:c5:0e:a4:b6:68:
- 79:5f:3d:52:ce:44:f9:20:c9:8e:b3:fb:20:42:d5:
- 97:9f:a4:41:8f:b8:b1:8d:c3:14:61:70:b8:d1:f7:
- ff:48:99:c1:a0:dd:71:cb:8b:91:e6:60:29:1e:af:
- a9:00:91:d2:c3:af:7f:cd:f9
+ 00:e8:61:96:bd:d0:d2:c6:54:92:15:fe:42:2b:86:
+ 20:dc:74:51:82:c8:b4:5e:5e:c5:3b:01:6e:1e:84:
+ 8d:4a:8c:6f:d8:63:21:a7:74:16:02:62:c3:84:1f:
+ ac:83:00:ad:6d:f8:79:d0:48:19:4a:a4:45:bf:24:
+ 88:db:89:f7:96:80:70:b1:f9:94:46:8d:52:cd:47:
+ 11:86:74:3b:04:c6:d2:08:3b:4d:70:b0:d4:a2:5a:
+ ae:54:43:4e:8c:26:05:77:b4:52:8b:bf:43:26:cd:
+ 6e:b6:04:ca:36:e1:cf:c3:70:52:7b:73:40:1d:1f:
+ 2a:44:b9:fc:d3:be:77:5a:df
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -29,39 +29,39 @@ Certificate:
OCSP - URI:http://ocsp.example.com:8888/
Signature Algorithm: sha1WithRSAEncryption
- 4c:c8:bc:0e:84:4b:bb:9e:c1:7b:81:4d:65:60:e5:d1:86:6a:
- 00:f2:fb:ff:6d:a1:23:a1:88:c7:85:4a:b2:3d:24:cf:92:c8:
- ab:60:10:b8:17:fa:d2:4f:60:cd:94:40:2a:b7:6e:4a:e9:f9:
- 2b:e6:54:70:7f:f3:71:f8:fc:45:df:cf:43:f4:26:d6:73:69:
- b3:ff:d9:da:dc:12:05:e2:52:62:2f:d4:b0:0a:e3:a1:e8:f2:
- c1:80:b7:44:8e:3a:46:ca:1b:6d:82:c0:16:c2:f6:4f:56:89:
- 24:86:42:8e:f9:5e:63:91:7d:88:ff:c4:bd:0d:f5:00:ad:ba:
- 6c:fd:5d:02:32:4f:94:3f:4e:10:4a:a6:15:c2:77:e6:be:a0:
- ea:15:e3:49:40:e8:f0:7d:e0:fe:33:f2:6b:36:a6:a6:70:52:
- 21:d2:ff:ee:ce:2d:46:50:dd:c2:19:4d:9a:1a:f1:a8:e8:45:
- 41:2d:6e:29:d3:c8:59:69:dd:1b:5c:21:21:31:b6:be:98:64:
- 31:a2:3e:a6:36:9c:27:8f:86:bb:0e:aa:67:f1:0b:e1:ea:d6:
- d6:50:72:6c:24:cd:85:8e:32:26:45:44:2e:7c:83:69:54:9b:
- 8b:1b:94:71:ba:8e:49:77:dd:d1:d4:30:a6:56:80:95:5e:6b:
- b8:11:bf:b0
+ a7:ce:f4:72:aa:54:01:d5:a0:ef:fb:54:a5:79:d0:51:87:27:
+ 93:37:d7:a8:92:a0:51:a4:56:a6:93:ea:3b:f4:e2:07:68:29:
+ 2b:59:e6:eb:71:d8:78:0a:b2:e2:df:13:9f:68:f9:6b:d8:42:
+ c6:ff:3b:e1:2e:01:91:9b:eb:90:7f:da:54:7e:5a:47:ba:40:
+ 18:fb:a5:f7:8a:3a:b0:05:37:03:a8:b8:23:61:d4:58:37:97:
+ 87:54:57:62:aa:7f:e6:73:8f:74:f4:3b:57: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g3l4dUV2Kqf+Zzj3T0O1cpr7v3vDNy
+1PMCIkQ+cB9IWX1uoK/EkVhMmWszKDYJWcdxp5S6Dq+H0kd1hsGsLauJgwOpl8tQ
+OcFmo6KS9shCBVvT5BMXhBBXjz6u0F73FVTdBGEv1tQlANZvAru5n/+r0qAyh6DS
+/5Epv110YdiG5YkpXsCFsQXheWhQ+iGYzCYJ0YYYTS6EITPR/7W/eC0LnoxRggmc
+A+w=
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/test-cn-with-drink-cert.pem b/tests/auto/qsslcertificate/more-certificates/test-cn-with-drink-cert.pem
index 952b711aa2..ed8823a520 100644
--- a/tests/auto/qsslcertificate/more-certificates/test-cn-with-drink-cert.pem
+++ b/tests/auto/qsslcertificate/more-certificates/test-cn-with-drink-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority
Validity
- Not Before: Jun 26 19:36:40 2011 GMT
- Not After : Jun 23 19:36:40 2021 GMT
+ Not Before: Jul 31 21:01:17 2011 GMT
+ Not After : Jul 28 21:01:17 2021 GMT
Subject: CN=example.com/emailAddress=test@example.com/favouriteDrink=tequila
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:a5:88:9c:fd:1b:8d:26:90:7d:ed:b2:66:14:09:
- 88:9f:c5:96:87:97:84:33:db:fd:a9:32:20:d0:4d:
- 03:ce:34:a6:b3:e2:db:33:27:e5:5b:09:3b:6f:49:
- 36:c8:99:63:88:4c:33:f2:55:bc:04:02:07:50:59:
- 6a:34:52:4c:83:74:cb:d5:54:b5:a9:41:91:07:0e:
- cf:50:3b:87:09:a5:5f:d8:71:f3:ee:d8:10:6d:5c:
- 5d:69:ab:dc:98:d7:1a:38:63:c6:15:4e:d7:31:19:
- 96:4c:db:be:d3:32:9d:ad:8b:1d:85:1b:aa:cf:d1:
- b1:a4:ce:bf:5a:0f:30:a0:63
+ 00:b8:2a:88:dd:a3:5b:4a:44:69:03:d5:6e:18:e9:
+ 9e:55:0d:35:d0:e6:9a:c2:cc:f8:b5:c5:b6:15:00:
+ a1:24:33:af:e8:fb:93:b9:cc:b9:22:28:ef:69:57:
+ b0:a2:d0:e3:9e:e5:73:3e:90:55:5b:91:26:0b:c4:
+ 1a:a6:b6:9d:a2:68:5b:e8:5b:45:3f:21:ff:84:64:
+ a7:84:bb:61:b7:72:e7:ea:cb:49:66:40:23:be:bf:
+ f0:8d:60:f2:fb:71:b2:fc:fe:6b:e7:07:94:35:65:
+ 66:d8:06:90:82:4d:b1:ba:6c:78:f4:42:17:cb:3c:
+ 0e:10:70:21:a9:31:3b:88:41
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -29,38 +29,38 @@ Certificate:
OCSP - URI:http://ocsp.example.com:8888/
Signature Algorithm: sha1WithRSAEncryption
- 21:55:2f:82:17:e6:8c:2c:39:af:2a:ce:b7:83:7f:cf:76:ce:
- 25:39:b5:08:3c:9b:33:a2:9b:f7:3f:df:7d:67:7b:11:c7:e3:
- ac:6f:59:c0:4f:25:3b:6d:3c:ec:3e:c2:0d:4c:a4:43:dd:4f:
- c4:4c:5a:67:9d:a9:7a:91:c3:48:ed:40:5e:4d:6f:18:46:38:
- 9c:e2:9a:7f:c9:d8:26:0c:35:fa:60:87:67:45:56:42:81:ba:
- 4b:b6:03:6f:6c:7d:d1:f9:78:a1:08:9e:4a:f1:00:07:4b:ca:
- ec:a4:1d:26:ad:63:46:63:5f:b2:64:2e:d3:cd:80:35:87:4f:
- c4:16:1a:91:97:50:95:16:31:c5:97:49:70:19:68:a9:a8:6c:
- 0f:c3:5b:8f:6a:1f:3f:e7:3b:ba:48:76:2c:b0:8d:b3:de:ce:
- 7b:c7:bf:0f:80:34:7c:73:d5:d6:45:63:83:02:c5:4d:73:9b:
- 66:8a:3a:66:dc:0c:9f:75:1a:a7:15:d1:1d:7f:12:af:f4:5d:
- 9c:80:99:55:9b:26:69:ec:76:11:fe:4e:65:f7:57:7d:32:bb:
- 9a:25:51:76:f5:68:99:2a:d2:a5:53:17:87:b6:ad:08:f1:24:
- db:6f:45:07:d2:f1:60:50:ac:a0:d0:b7:0b:45:aa:e2:27:38:
- 1f:4c:41:a3
+ 4b:a3:3d:37:e4:fa:61:3b:8c:94:c7:b1:49:55:a6:63:c4:b8:
+ 13:33:8c:0b:ad:c9:f6:38:d1:a6:d3:5e:7f:10:23:be:d5:4c:
+ 63:de:15:9b:eb:f1:08:0c:32:95:ff:87:bc:c7:41:c3:17:af:
+ 73:c9:ac:18:2c:3d:6d:87:9b:41:71:92:e4:57:f0:da:b7:f4:
+ f3:92:dd:db:a0:b3:82:1a:8d:88:d4:ff:b2:8e:ac:65:6f:b0:
+ 59:0a:4e:cf:12:cd:fe:ce:35:85:da:13:1c:5e:d0:30:38:8a:
+ ec:46:eb:d7:a7:87:93:1b:08:a0:28:b0:2d:fc:7d:36:51:2f:
+ df:6b:67:57:15:b3:a7:cf:dd:55:ee:81:fc:66:fc:a7:22:5f:
+ e7:86:91:0b:3f:35:56:5f:fa:41:9c:71:06:03:d0:62:d2:3b:
+ e2:08:ab:af:42:2b:1f:68:9f:17:0a:20:3b:de:a1:fa:0a:44:
+ a8:67:67:c2:96:7a:ec:fa:92:4d:8f:c8:ba:be:d7:0c:c7:c8:
+ 6d:9f:b1:6c:c8:1d:e9:b9:5c:30:f3:a2:52:43:e5:43:2a:54:
+ 24:15:b3:d5:95:af:f8:01:ab:f3:c3:3f:1d:8e:35:58:11:6c:
+ 12:82:6f:ad:c3:78:c1:cd:43:ff:93:90:25:9f:97:17:36:8e:
+ 74:28:e8:a9
-----BEGIN CERTIFICATE-----
MIIDOzCCAiOgAwIBAgIBCzANBgkqhkiG9w0BAQUFADCBqzEmMCQGA1UEAxMdV2Vz
dHBvaW50IENlcnRpZmljYXRlIFRl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gmDDX6YIdnRVZCgbpLtgNvbH3R
-+XihCJ5K8QAHS8rspB0mrWNGY1+yZC7TzYA1h0/EFhqRl1CVFjHFl0lwGWipqGwP
-w1uPah8/5zu6SHYssI2z3s57x78PgDR8c9XWRWODAsVNc5tmijpm3AyfdRqnFdEd
-fxKv9F2cgJlVmyZp7HYR/k5l91d9MruaJVF29WiZKtKlUxeHtq0I8STbb0UH0vFg
-UKyg0LcLRariJzgfTEGj
+dHA6Ly9vY3NwLmV4YW1wbGUuY29tOjg4ODgvMA0GCSqGSIb3DQEBBQUAA4IBAQBL
+oz035PphO4yUx7FJVaZjxLgTM4wLrcn2ONGm015/ECO+1Uxj3hWb6/EIDDKV/4e8
+x0HDF69zyawYLD1th5tBcZLkV/Dat/Tzkt3boLOCGo2I1P+yjqxlb7BZCk7PEs3+
+zjWF2hMcXtAwOIrsRuvXp4eTGwigKLAt/H02US/fa2dXFbOnz91V7oH8ZvynIl/n
+hpELPzVWX/pBnHEGA9Bi0jviCKuvQisfaJ8XCiA73qH6CkSoZ2fClnrs+pJNj8i6
+vtcMx8htn7FsyB3puVww86JSQ+VDKlQkFbPVla/4Aavzwz8djjVYEWwSgm+tw3jB
+zUP/k5Aln5cXNo50KOip
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index e0bc029c71..bcd21eefe2 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -95,9 +95,9 @@ private slots:
void copyAndAssign();
void digest_data();
void digest();
- void alternateSubjectNames_data();
+ void subjectAlternativeNames_data();
void utf8SubjectNames();
- void alternateSubjectNames();
+ void subjectAlternativeNames();
void publicKey_data();
void publicKey();
void toPemOrDer_data();
@@ -203,7 +203,7 @@ void tst_QSslCertificate::emptyConstructor()
QCOMPARE(certificate.digest(), QCryptographicHash::hash(QByteArray(), QCryptographicHash::Md5));
QCOMPARE(certificate.issuerInfo(QSslCertificate::Organization), QStringList());
QCOMPARE(certificate.subjectInfo(QSslCertificate::Organization), QStringList());
- QCOMPARE(certificate.alternateSubjectNames(),(QMultiMap<QSsl::AlternateNameEntryType, QString>()));
+ QCOMPARE(certificate.subjectAlternativeNames(),(QMultiMap<QSsl::AlternativeNameEntryType, QString>()));
#ifndef QT_NO_TEXTSTREAM
QCOMPARE(certificate.effectiveDate(), QDateTime());
QCOMPARE(certificate.expiryDate(), QDateTime());
@@ -272,7 +272,7 @@ void tst_QSslCertificate::compareCertificates(
QCOMPARE(cert1.issuerInfo(subjectInfo), cert2.issuerInfo(subjectInfo));
QCOMPARE(cert1.subjectInfo(subjectInfo), cert2.subjectInfo(subjectInfo));
}
- QCOMPARE(cert1.alternateSubjectNames(), cert2.alternateSubjectNames());
+ QCOMPARE(cert1.subjectAlternativeNames(), cert2.subjectAlternativeNames());
QCOMPARE(cert1.effectiveDate(), cert2.effectiveDate());
QCOMPARE(cert1.expiryDate(), cert2.expiryDate());
QCOMPARE(cert1.version(), cert2.version());
@@ -352,7 +352,7 @@ void tst_QSslCertificate::digest()
certificate.digest(QCryptographicHash::Sha1));
}
-void tst_QSslCertificate::alternateSubjectNames_data()
+void tst_QSslCertificate::subjectAlternativeNames_data()
{
QTest::addColumn<QString>("certFilePath");
QTest::addColumn<QSsl::EncodingFormat>("format");
@@ -368,7 +368,7 @@ void tst_QSslCertificate::alternateSubjectNames_data()
}
}
-void tst_QSslCertificate::alternateSubjectNames()
+void tst_QSslCertificate::subjectAlternativeNames()
{
if (!QSslSocket::supportsSsl())
return;
@@ -383,11 +383,11 @@ void tst_QSslCertificate::alternateSubjectNames()
QByteArray fileContents = readFile(subjAltNameFilePath);
- const QMultiMap<QSsl::AlternateNameEntryType, QString> altSubjectNames =
- certificate.alternateSubjectNames();
+ const QMultiMap<QSsl::AlternativeNameEntryType, QString> altSubjectNames =
+ certificate.subjectAlternativeNames();
// verify that each entry in subjAltNames is present in fileContents
- QMapIterator<QSsl::AlternateNameEntryType, QString> it(altSubjectNames);
+ QMapIterator<QSsl::AlternativeNameEntryType, QString> it(altSubjectNames);
while (it.hasNext()) {
it.next();
QString type;
@@ -404,7 +404,7 @@ void tst_QSslCertificate::alternateSubjectNames()
// verify that each entry in fileContents is present in subjAltNames
QRegExp rx(QLatin1String("(email|DNS):([^,\\r\\n]+)"));
for (int pos = 0; (pos = rx.indexIn(fileContents, pos)) != -1; pos += rx.matchedLength()) {
- QSsl::AlternateNameEntryType key;
+ QSsl::AlternativeNameEntryType key;
if (rx.cap(1) == QLatin1String("email"))
key = QSsl::EmailEntry;
else if (rx.cap(1) == QLatin1String("DNS"))
@@ -811,7 +811,7 @@ void tst_QSslCertificate::nulInSan()
const QSslCertificate &cert = certList.at(0);
QVERIFY(!cert.isNull());
- QMultiMap<QSsl::AlternateNameEntryType, QString> san = cert.alternateSubjectNames();
+ QMultiMap<QSsl::AlternativeNameEntryType, QString> san = cert.subjectAlternativeNames();
QVERIFY(!san.isEmpty());
QString dnssan = san.value(QSsl::DnsEntry);
@@ -929,7 +929,6 @@ void tst_QSslCertificate::verify()
toVerify = QSslCertificate::fromPath(SRCDIR "verify-certs/test-ocsp-good-cert.pem");
errors = QSslCertificate::verify(toVerify);
- QEXPECT_FAIL("", "QTBUG-20582 fails since ~5am, 27th July 2011", Continue);
VERIFY_VERBOSE(errors.count() == 0);
errors.clear();
@@ -965,12 +964,10 @@ void tst_QSslCertificate::verify()
toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-is-ca-cert.pem").first();
toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-ca-cert.pem").first();
errors = QSslCertificate::verify(toVerify);
- QEXPECT_FAIL("", "QTBUG-20582 fails since ~5am, 27th July 2011", Continue);
VERIFY_VERBOSE(errors.count() == 0);
// Recheck the above with hostname validation
errors = QSslCertificate::verify(toVerify, QLatin1String("example.com"));
- QEXPECT_FAIL("", "QTBUG-20582 fails since ~5am, 27th July 2011", Continue);
VERIFY_VERBOSE(errors.count() == 0);
// Recheck the above with a bad hostname
diff --git a/tests/auto/qsslcertificate/verify-certs/cacert.pem b/tests/auto/qsslcertificate/verify-certs/cacert.pem
index 0e06285766..8c75c54bcb 100644
--- a/tests/auto/qsslcertificate/verify-certs/cacert.pem
+++ b/tests/auto/qsslcertificate/verify-certs/cacert.pem
@@ -1,23 +1,23 @@
-----BEGIN CERTIFICATE-----
-MIID6zCCAtOgAwIBAgIJALIOhqebAhS9MA0GCSqGSIb3DQEBBQUAMIGrMSYwJAYD
+MIID6zCCAtOgAwIBAgIJAP4bjANFSx0BMA0GCSqGSIb3DQEBBQUAMIGrMSYwJAYD
VQQDEx1XZXN0cG9pbnQgQ2VydGlmaWNhdGUgVGVzdCBDQTETMBEGA1UECBMKTGFu
Y2FzaGlyZTELMAkGA1UEBhMCVUsxHTAbBgkqhkiG9w0BCQEWDmNhQGV4YW1wbGUu
Y29tMUAwPgYDVQQKEzdXZXN0cG9pbnQgQ2VydGlmaWNhdGUgVGVzdCBSb290IENl
-cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTExMDYyNjE5MzYzOVoXDTExMDcyNjE5
-MzYzOVowgasxJjAkBgNVBAMTHVdlc3Rwb2ludCBDZXJ0aWZpY2F0ZSBUZXN0IENB
+cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTExMDczMTIxMDExNloXDTIxMDcyODIx
+MDExNlowgasxJjAkBgNVBAMTHVdlc3Rwb2ludCBDZXJ0aWZpY2F0ZSBUZXN0IENB
MRMwEQYDVQQIEwpMYW5jYXNoaXJlMQswCQYDVQQGEwJVSzEdMBsGCSqGSIb3DQEJ
ARYOY2FAZXhhbXBsZS5jb20xQDA+BgNVBAoTN1dlc3Rwb2ludCBDZXJ0aWZpY2F0
ZSBUZXN0IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQCoP3znX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MSQ+N9AQpentWl
+RH6Vt1eY52YTxjNxpRlj88GBnYxdr8WgjKOV7v8OPGXP6zWlAgMBAAGjEDAOMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADptDEfvsh8aq/tTc7ciGkHG
+jh7WFELVTcdWBTyveZ24298Hl9UOfsAfLqjMGMs3delAaZocchba9Og2xSZyRstH
+GUtlJXd4PnSJSx/TksPf2DCANo5sxBWBITs1Iprm3Nlm3/xPZM2QLIamRYi2J6Ed
+JTfWvMpoaW1umJX49jKqk1gfdcS6eUSaXetgYP2FQV7DstqPLYfQ731nEXZ1LXFM
+PO7IoPccqk4YJ0KOV7hFb7NCq4a6cz/Gf0S0qJ44vqHz6iRZpmWIo5UFivwtLw9r
+iMbdJ1mCCMR0oN5om3muKc7Sz+l2ItxdYMcLkZ1/3ouvQqOX+qIOrYEUN1RZCzI=
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem b/tests/auto/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem
index ab4c2dacf6..d00490caba 100644
--- a/tests/auto/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem
+++ b/tests/auto/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority
Validity
- Not Before: Jun 26 19:36:42 2011 GMT
- Not After : Jun 23 19:36:42 2021 GMT
+ Not Before: Jul 31 21:01:18 2011 GMT
+ Not After : Jul 28 21:01:18 2021 GMT
Subject: ST=Lancashire, C=UK/emailAddress=test@example.com, O=Test intermediate CA
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:a7:ed:3f:86:ee:ad:f8:b7:60:44:63:fc:1b:2c:
- 79:3c:90:8b:47:b8:51:b5:3e:96:6d:5d:f1:97:b3:
- de:90:b2:9a:aa:9e:54:7e:2b:b1:6d:91:ae:20:29:
- b6:69:7b:8a:e5:6c:41:10:b6:d3:73:4c:20:30:38:
- 57:c9:c8:ef:67:7e:76:39:c4:1c:df:6b:73:4e:2b:
- 21:2d:79:5a:c5:60:5e:85:11:52:3b:8e:ef:b0:e5:
- 2f:0c:e8:a3:fc:05:27:91:08:64:ea:2e:5a:f2:82:
- 0c:08:48:bc:bc:ca:60:02:1c:6a:38:eb:c8:02:a6:
- f7:e8:c8:31:20:29:e6:e4:8d
+ 00:bc:bd:83:c1:bc:36:d8:9c:74:68:5a:46:48:25:
+ 83:59:f8:35:1e:8f:dc:2c:52:3b:7c:2e:ea:40:c4:
+ 93:b6:39:31:df:f5:a6:f8:01:17:67:93:21:59:9b:
+ 89:7f:ed:2a:19:7b:25:a5:e1:71:12:99:e5:14:28:
+ df:75:b5:17:1c:3b:1d:3d:74:48:4f:b7:42:f4:3a:
+ ab:56:05:2b:fc:d3:27:97:01:08:5b:ad:26:9b:f2:
+ 87:51:9c:7e:e1:f1:ef:1c:bf:ad:7e:38:d9:76:89:
+ 30:a6:8c:2f:6f:87:9f:9e:57:13:14:b4:45:30:f3:
+ be:58:df:8a:d2:ee:7b:1d:89
Exponent: 65537 (0x10001)
X509v3 extensions:
Authority Information Access:
@@ -29,38 +29,38 @@ Certificate:
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
- 94:1a:91:6a:05:41:0c:40:f9:46:35:e9:46:15:f1:3e:e4:d9:
- 50:d6:0e:14:d8:1f:85:9e:a6:98:a2:db:db:ee:ff:56:55:6c:
- 46:fd:0e:b0:03:79:a6:96:0f:c1:85:c3:3e:68:e0:17:10:a6:
- 9c:10:34:88:96:f7:c8:ef:32:31:24:f4:3c:2d:eb:51:08:d6:
- 87:83:f7:db:68:43:ed:d9:af:46:a2:48:74:d2:9d:c9:af:0f:
- 29:42:ad:a2:cf:1e:ab:50:6f:ef:33:18:d3:07:ef:13:13:10:
- 50:db:a9:56:db:f4:38:c1:db:05:fa:5a:67:92:72:69:fb:7a:
- 5b:ec:d4:dd:fd:a2:21:06:59:b0:0d:48:5f:53:c1:65:94:aa:
- d4:4e:1c:e8:9f:b4:7d:9b:10:85:4a:b6:be:df:d8:33:b5:72:
- b0:ac:46:a9:67:55:1e:3e:58:a5:52:ed:b6:4a:cb:e9:d2:e5:
- f8:fe:56:b4:2c:5e:9f:3c:d1:7f:b4:eb:05:8d:46:1f:47:32:
- 2b:4f:2e:ac:8d:c3:3c:eb:f1:0c:2f:3a:e0:fa:46:0b:e4:c5:
- f2:03:24:70:fc:ef:1a:fd:7b:a9:9c:d9:b6:4f:0e:74:07:52:
- 23:eb:cd:66:61:67:a1:91:7f:76:a2:9d:42:54:d4:c6:5e:10:
- 26:eb:37:e7
+ 33:84:9d:0e:b2:59:04:dc:ef:e3:04:8b:00:6c:64:ea:58:9e:
+ 36:59:76:27:59:a0:b8:ee:0d:86:83:ff:db:65:eb:6c:1f:16:
+ 47:e7:f5:e6:c3:88:81:73:7e:ed:12:8d:7e:fd:5e:b1:5c:68:
+ 47:f8:f9:ca:e3:e0:c0:f3:12:b2:24:3b:77:2c:98:de:05:6d:
+ a8:ec:27:b8:af:ab:84:25:26:73:b4:58:4c:7c:c1:74:97:98:
+ ab:0e:e6:99:70:bc:38:b0:9a:e3:d9:5c:75:fa:46:d2:87:55:
+ 09:86:8f:ef:4a:e4:ef:3e:32:c6:ac:9d:27:86:29:b8:78:38:
+ 7b:87:6c:57:72:bd:57:99:73:36:db:fa:52:bd:7b:a7:05:cd:
+ 28:b8:85:fc:11:47:5e:c6:77:72:6a:fb:73:3e:8b:a4:6d:f8:
+ 17:f4:12:d5:36:e0:ef:5c:f8:b2:a1:69:3e:4c:cf:86:5f:63:
+ f6:02:60:95:7f:61:e8:cb:7f:14:66:da:36:2e:78:13:3e:68:
+ ae:3f:13:c1:79:88:18:18:3f:23:f3:9a:e1:e7:7e:ae:50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RIT7dC9DqrVgUr/NMnlwEIW60mm/KHUZx+4fHvHL+tfjjZdokwpowvb4efnlcT
+FLRFMPO+WN+K0u57HYkCAwEAAaNLMEkwOQYIKwYBBQUHAQEELTArMCkGCCsGAQUF
BzABhh1odHRwOi8vb2NzcC5leGFtcGxlLmNvbTo4ODg4LzAMBgNVHRMEBTADAQH/
-MA0GCSqGSIb3DQEBBQUAA4IBAQCUGpFqBUEMQPlGNelGFfE+5NlQ1g4U2B+FnqaY
-otvb7v9WVWxG/Q6wA3mmlg/BhcM+aOAXEKacEDSIlvfI7zIxJPQ8LetRCNaHg/fb
-aEPt2a9Gokh00p3Jrw8pQq2izx6rUG/vMxjTB+8TExBQ26lW2/Q4wdsF+lpnknJp
-+3pb7NTd/aIhBlmwDUhfU8FllKrUThzon7R9mxCFSra+39gztXKwrEapZ1UePlil
-Uu22Ssvp0uX4/la0LF6fPNF/tOsFjUYfRzIrTy6sjcM86/EMLzrg+kYL5MXyAyRw
-/O8a/XupnNm2Tw50B1Ij681mYWehkX92op1CVNTGXhAm6zfn
+MA0GCSqGSIb3DQEBBQUAA4IBAQAzhJ0OslkE3O/jBIsAbGTqWJ42WXYnWaC47g2G
+g//bZetsHxZH5/Xmw4iBc37tEo1+/V6xXGhH+PnK4+DA8xKyJDt3LJjeBW2o7Ce4
+r6uEJSZztFhMfMF0l5irDuaZcLw4sJrj2Vx1+kbSh1UJho/vSuTvPjLGrJ0nhim4
+eDh7h2xXcr1XmXM22/pSvXunBc0ouIX8EUdexndyavtzPoukbfgX9BLVNuDvXPiy
+oWk+TM+GX2P2AmCVf2Hoy38UZto2LngTPmiuPxPBeYgYGD8j85rh536uUOS3gHYx
+knR5LN7QdP6BfPYBFGofX4iFahEdUK/xl01nQMPprm9g4rzi
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem b/tests/auto/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem
index 27945856b7..396cad86cb 100644
--- a/tests/auto/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem
+++ b/tests/auto/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: ST=Lancashire, C=UK/emailAddress=test@example.com, O=Test intermediate CA
Validity
- Not Before: Jun 26 19:36:42 2011 GMT
- Not After : Jun 23 19:36:42 2021 GMT
+ Not Before: Jul 31 21:01:18 2011 GMT
+ Not After : Jul 28 21:01:18 2021 GMT
Subject: CN=example.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:ba:f2:dc:f9:77:b0:ad:fd:9d:42:4f:22:15:6d:
- 87:40:ed:30:8a:04:ad:ac:7a:0b:d4:7a:a4:a7:ef:
- e0:e7:9b:f2:5e:62:56:24:ed:88:bd:bd:e3:64:d2:
- d4:b4:01:39:b8:9e:6f:c7:b0:fc:b9:fd:a8:4d:46:
- c8:9e:6a:43:82:ca:56:83:d4:4b:ea:63:d5:56:d1:
- 99:46:4f:8b:28:d0:2f:db:bf:04:65:64:82:c2:61:
- aa:66:50:27:e5:7a:57:e3:72:e3:ae:22:8d:92:7e:
- 25:90:a2:7c:0c:04:79:c5:ab:64:58:a9:83:79:67:
- 7f:72:33:cc:5f:5b:cd:74:bb
+ 00:c9:bb:98:5b:27:cd:b1:8a:a9:38:fc:aa:bb:ad:
+ a1:ed:cb:94:94:3e:79:90:ae:35:f3:87:b1:2a:4e:
+ d5:ff:55:93:e0:1a:68:2a:36:94:05:38:a7:72:64:
+ a3:31:0f:61:5c:ec:76:41:f1:35:4a:5e:bc:ef:51:
+ 90:9e:33:b4:08:7a:3f:f0:04:a8:46:99:96:25:b3:
+ 03:c8:cd:8c:33:42:76:82:b9:db:61:c6:91:ed:76:
+ 86:ae:04:38:d7:e5:5c:a9:a9:f9:b6:13:f4:90:40:
+ 6d:ec:2f:ba:ed:bc:ff:88:05:f0:7b:c8:ac:bd:d0:
+ 72:3a:91:64:86:06:89:66:0d
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -29,25 +29,25 @@ Certificate:
OCSP - URI:http://ocsp.example.com:8888/
Signature Algorithm: sha1WithRSAEncryption
- 19:e8:ce:9d:4d:ef:cc:4f:6c:e5:ab:df:aa:e2:3c:d8:6b:a8:
- dd:b8:fa:50:e4:b6:04:fc:66:92:fb:e8:11:73:81:60:1a:88:
- b2:18:0b:8c:89:05:47:16:50:09:be:bc:a6:3c:fe:2e:45:01:
- 00:e3:27:30:72:f6:93:49:7f:d0:3b:a8:0e:cb:e7:01:95:28:
- 8b:40:95:f7:b1:5b:c9:ff:26:ff:ad:4a:c4:e4:99:f7:65:fc:
- e4:5e:d2:56:ea:98:42:dc:93:62:46:1a:33:53:0d:43:9d:ef:
- 14:03:35:a7:13:fa:27:24:92:2f:9a:f9:0a:62:99:cc:c0:80:
- 79:10
+ 22:30:97:01:ea:d0:a8:d8:b5:32:97:c8:c9:8b:7d:01:02:53:
+ 74:f8:0a:10:dc:fc:73:b2:50:bb:59:47:f3:e4:9f:44:94:d5:
+ ca:c0:64:da:83:00:95:43:15:a5:e3:30:ce:66:ca:55:8c:16:
+ 03:1e:55:02:8b:c7:ad:ed:2e:ae:ee:31:59:53:37:ff:26:86:
+ 93:9d:e2:69:2e:c0:2a:66:38:a5:b5:54:a1:02:0a:83:67:e0:
+ 91:cf:fc:09:c3:70:71:b6:cf:fc:d3:e9:9f:f5:1c:4d:55:ec:
+ 66:f7:07:71:fc:d6:17:de:e1:ab:e6:f2:7b:83:46:1e:b9:96:
+ 95:8f
-----BEGIN CERTIFICATE-----
MIICNjCCAZ+gAwIBAgIBHTANBgkqhkiG9w0BAQUFADBiMRMwEQYDVQQIEwpMYW5j
YXNoaXJlMQswCQYDVQQGEwJVSzEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
-LmNvbTEdMBsGA1UEChMUVGVzdCBpbnRlcm1lZGlhdGU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crA
+ZNqDAJVDFaXjMM5mylWMFgMeVQKLx63tLq7uMVlTN/8mhpOd4mkuwCpmOKW1VKEC
+CoNn4JHP/AnDcHG2z/zT6Z/1HE1V7Gb3B3H81hfe4avm8nuDRh65lpWP
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem b/tests/auto/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem
index 704346c958..34ad2b10a8 100644
--- a/tests/auto/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem
+++ b/tests/auto/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=example.com, ST=Lancashire, C=UK/emailAddress=test@example.com, O=Some organisation
Validity
- Not Before: Jun 26 19:36:42 2011 GMT
- Not After : Jun 23 19:36:42 2021 GMT
+ Not Before: Jul 31 21:01:18 2011 GMT
+ Not After : Jul 28 21:01:18 2021 GMT
Subject: CN=example.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:d7:b6:a8:07:83:27:b8:72:da:85:ad:50:bf:c2:
- 3f:cc:d4:e7:97:55:b5:45:aa:d2:cb:df:b6:34:6f:
- c2:8f:86:e2:15:8a:cd:3e:af:f5:c0:f9:2e:61:80:
- 70:17:d3:db:0f:8a:e6:2c:a8:e3:12:2d:92:e1:8d:
- 10:e0:e7:30:94:98:ec:b0:21:c3:86:f7:ff:29:58:
- 2b:ab:b1:23:e4:ca:66:66:6a:18:b5:73:dc:c7:44:
- 04:30:55:bf:f9:3b:74:f6:de:bd:d9:ef:46:b0:15:
- 56:3b:43:cc:55:c2:cc:2e:5d:17:f8:04:dc:3d:bf:
- 1b:cc:0a:41:61:c8:35:02:1b
+ 00:ea:d6:97:b5:3c:f4:37:8a:58:b4:7a:49:31:55:
+ dd:c8:84:ee:36:f6:72:3a:31:99:d1:df:af:bb:f9:
+ 17:e9:d8:47:d2:20:4b:94:ce:ea:c1:6b:23:9a:da:
+ 02:41:29:51:34:05:13:c0:98:4d:87:f8:91:a8:85:
+ 81:e4:ab:26:3d:26:59:29:16:7d:04:db:57:7b:f0:
+ b6:2b:5d:cf:e7:82:ba:83:a7:bc:63:43:03:2a:2b:
+ 18:40:89:4c:1e:90:bc:bf:10:24:81:50:0d:2e:e8:
+ 8e:a9:0a:fc:f8:cd:97:98:3c:cc:55:b7:f2:b2:0d:
+ 0e:36:53:3a:b2:d0:45:90:8b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -29,26 +29,26 @@ Certificate:
OCSP - URI:http://ocsp.example.com:8888/
Signature Algorithm: sha1WithRSAEncryption
- 18:e2:06:f3:4b:42:46:b6:29:d1:8d:50:ef:5b:8b:e5:33:24:
- f3:f1:3e:58:4d:7f:3e:51:e9:c4:a2:cb:64:5f:d1:51:ce:8d:
- b6:15:63:23:30:4b:7c:70:30:61:ce:1f:70:bb:99:63:5b:15:
- d9:ce:aa:da:65:87:66:ab:ad:64:e8:09:37:ea:79:d0:3a:a2:
- e0:cf:0b:1b:a7:35:3d:f8:45:4c:4b:96:15:ec:fe:64:9f:e0:
- 1d:04:52:35:a1:b4:7e:31:34:84:7e:e6:e0:58:1e:14:02:df:
- 68:f6:b6:eb:dc:10:eb:da:fe:8e:06:ab:52:b7:ca:15:c3:8d:
- 5a:8a
+ 82:d8:53:9c:d8:0b:0a:b3:9d:b4:0a:9f:93:ec:96:a6:31:6b:
+ 79:c9:d2:1c:76:0b:b7:f3:9f:b9:7a:dd:d7:b7:7b:26:ba:0a:
+ 54:2a:a3:ad:89:8e:3c:b8:8e:ea:09:53:58:73:9a:b3:a0:40:
+ 90:02:f2:60:04:b8:f0:2a:61:bd:91:9b:5e:81:5f:bf:cc:f2:
+ 33:33:8a:70:07:f5:ea:c0:05:38:34:f7:dc:ea:0c:74:01:5d:
+ dd:92:ab:f2:87:64:1b:7c:be:ae:37:c1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DvW4vlMyTz
-8T5YTX8+UenEostkX9FRzo22FWMjMEt8cDBhzh9wu5ljWxXZzqraZYdmq61k6Ak3
-6nnQOqLgzwsbpzU9+EVMS5YV7P5kn+AdBFI1obR+MTSEfubgWB4UAt9o9rbr3BDr
-2v6OBqtSt8oVw41aig==
+LmNvbTo4ODg4LzANBgkqhkiG9w0BAQUFAAOBgQCC2FOc2AsKs520Cp+T7JamMWt5
+ydIcdgu385+5et3Xt3smugpUKqOtiY48uI7qCVNYc5qzoECQAvJgBLjwKmG9kZte
+gV+/zPIzM4pwB/XqwAU4NPfc6gx0AV3dkqvyh2QbfL6uN8FsrplzpapFIDJXGcsw
+RWEsOyNS7vDMEoCXNA==
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/verify-certs/test-ocsp-good-cert.pem b/tests/auto/qsslcertificate/verify-certs/test-ocsp-good-cert.pem
index 1e138cef8a..34b26c6d5e 100644
--- a/tests/auto/qsslcertificate/verify-certs/test-ocsp-good-cert.pem
+++ b/tests/auto/qsslcertificate/verify-certs/test-ocsp-good-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority
Validity
- Not Before: Jun 26 19:36:39 2011 GMT
- Not After : Jun 23 19:36:39 2021 GMT
+ Not Before: Jul 31 21:01:16 2011 GMT
+ Not After : Jul 28 21:01:16 2021 GMT
Subject: CN=example.com, ST=Lancashire, C=UK/emailAddress=test@example.com, O=Some organisation
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:c7:d8:d4:a7:c0:a0:e7:82:b4:ec:67:52:bf:50:
- bf:b9:a6:f2:10:19:67:53:8c:99:5e:c8:fc:03:07:
- 71:24:a3:a9:c4:49:f8:15:34:4a:45:ee:92:81:aa:
- 3c:5a:1a:42:2b:db:d7:30:9e:85:e6:b8:74:bc:ae:
- f0:ae:7d:05:4e:c9:0f:00:33:b2:86:ba:b6:49:9a:
- 07:18:92:f9:35:69:d2:ac:39:b9:85:ac:78:99:81:
- 06:f5:fa:2e:5b:18:f7:6a:16:d0:e6:f9:71:0f:b0:
- 05:c4:f0:5f:ed:90:81:3c:96:f5:e3:45:73:72:5f:
- ce:dc:ce:0b:56:2e:be:d2:eb
+ 00:97:c9:92:27:81:a7:4c:64:82:a2:30:d6:07:b7:
+ 57:e0:9c:ea:cd:eb:53:be:ea:b6:b5:47:66:d0:68:
+ 54:25:a7:ed:21:5c:dc:fd:da:41:f6:c7:c0:35:ae:
+ 97:72:fd:8b:af:29:3d:38:5a:67:8b:39:8a:ce:86:
+ 25:0f:38:a7:b5:38:b3:8e:81:f0:ea:79:99:cb:f5:
+ 23:64:55:f3:4b:a4:b6:23:64:29:ea:ba:f3:29:52:
+ a7:7f:32:dc:0d:b6:d9:d4:e6:13:de:01:41:86:9a:
+ 2d:8f:bb:0c:18:88:09:ac:d4:6a:e9:cb:8a:17:8a:
+ 85:09:a6:ae:a6:1c:05:e9:55
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -29,39 +29,39 @@ Certificate:
OCSP - URI:http://ocsp.example.com:8888/
Signature Algorithm: sha1WithRSAEncryption
- 76:84:40:52:b8:1d:6c:64:58:f1:10:30:03:db:16:91:da:b1:
- 70:28:54:6f:0f:32:1c:84:65:b3:14:99:c6:59:f9:ec:f9:3f:
- 46:1f:12:77:4e:f1:26:ad:46:4b:ee:48:78:bd:bf:2a:11:01:
- 5b:02:cd:d2:6e:2d:8c:08:ea:a7:5a:18:16:71:e8:5d:c8:e7:
- 7d:f2:4f:23:6c:59:3c:17:93:02:60:c0:d0:62:09:d2:a3:7d:
- 90:77:6c:f7:0c:b2:e4:9e:73:d2:f8:dd:a3:0c:70:36:2f:5a:
- 58:2b:2d:3e:0e:71:43:b2:14:00:e2:eb:2d:0e:09:91:47:83:
- e8:02:d4:7d:5c:1f:ce:d8:f5:ad:1f:ee:82:4f:23:47:db:f4:
- 71:48:1b:e1:82:f1:d1:86:db:0f:b6:bb:3a:8f:40:05:48:b7:
- f2:a8:c7:c9:46:e1:ea:28:b2:02:00:90:04:00:19:32:6f:8d:
- 3e:c2:67:ca:b0:80:3a:32:e3:35:92:18:a2:62:30:9d:7a:f5:
- 13:3b:c7:00:3f:4e:17:a9:01:5d:a1:2c:71:76:d7:37:c8:16:
- 92:f8:82:69:15:5f:7d:5e:b0:ba:0b:9f:bd:53:ad:e5:a6:b3:
- bc:6b:e4:1a:79:29:31:ff:ff:a1:2d:0b:30:46:d3:a5:2d:62:
- e6:be:68:df
+ 8b:9b:96:fb:8e:1b:77:f5:70:39:fe:76:51:ac:a9:6b:80:a5:
+ b7:95:8b:c3:1a:9c:1f:bb:d1:d1:68:43:40:96:62:d6:a6:da:
+ d9:fd:9d:9a:9e:8a:84:fa:f5:54:ce:a8:d7:37:c7:0c:95:fc:
+ 11:8b:e9:32:53:e5:59:61:0a:53:70:f3:d6:ed:3f:b1:f4:49:
+ bf:86:c1:77:0d:b1:ac:65:7e:62:d2:f2:5a:31:50:a7:ed:28:
+ bb:63:d5:f3:4f:43:3a:3f:bf:3b:d0:94:aa:a1:74:95:be:a4:
+ 0f:8b:e0:6f:d8:33:84:76:71:b2:da:f4:0e:1e:d2:eb:f0:c3:
+ 1e:33:79:21:35:93:18:05:38:db:63:85:1a:e4:84:41:0a:c3:
+ fb:fd:5c:69:3d:18:0a:38:b8:16:18:d3:23:b9:51:47:2e:54:
+ 08:d1:fc:2e:b6:63:62:78:9c:26:59:c2:5e:5a:38:76:47:e7:
+ f0:f8:7b:b7:00:46:34:b0:44:28:a9:33:d7:e5:1d:52:c8:fb:
+ 32:a5:25:86:21:0c:80:f0:4b:37:60:a0:45:69:9f:6b:b0:34:
+ 91:5e:4c:62:45:99:83:1d:80:48:78:bb:ee:d4:83:39:76:c3:
+ e6:fb:31:e9:20:f0:64:90:24:4e:c6:07:75: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CCsGAQUFBzABhh1odHRwOi8vb2NzcC5l
-eGFtcGxlLmNvbTo4ODg4LzANBgkqhkiG9w0BAQUFAAOCAQEAdoRAUrgdbGRY8RAw
-A9sWkdqxcChUbw8yHIRlsxSZxln57Pk/Rh8Sd07xJq1GS+5IeL2/KhEBWwLN0m4t
-jAjqp1oYFnHoXcjnffJPI2xZPBeTAmDA0GIJ0qN9kHds9wyy5J5z0vjdowxwNi9a
-WCstPg5xQ7IUAOLrLQ4JkUeD6ALUfVwfztj1rR/ugk8jR9v0cUgb4YLx0YbbD7a7
-Oo9ABUi38qjHyUbh6iiyAgCQBAAZMm+NPsJnyrCAOjLjNZIYomIwnXr1EzvHAD9O
-F6kBXaEscXbXN8gWkviCaRVffV6wugufvVOt5aazvGvkGnkpMf//oS0LMEbTpS1i
-5r5o3w==
+eGFtcGxlLmNvbTo4ODg4LzANBgkqhkiG9w0BAQUFAAOCAQEAi5uW+44bd/VwOf52
+Uaypa4Clt5WLwxqcH7vR0WhDQJZi1qba2f2dmp6KhPr1VM6o1zfHDJX8EYvpMlPl
+WWEKU3Dz1u0/sfRJv4bBdw2xrGV+YtLyWjFQp+0ou2PV809DOj+/O9CUqqF0lb6k
+D4vgb9gzhHZxstr0Dh7S6/DDHjN5ITWTGAU422OFGuSEQQrD+/1caT0YCji4FhjT
+I7lRRy5UCNH8LrZjYnicJlnCXlo4dkfn8Ph7twBGNLBEKKkz1+UdUsj7MqUlhiEM
+gPBLN2CgRWmfa7A0kV5MYkWZgx2ASHi77tSDOXbD5vsx6SDwZJAkTsYHdUAffpd3
+H7+i7w==
-----END CERTIFICATE-----
diff --git a/tests/auto/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp b/tests/auto/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
index 7e1516218a..c884e78391 100644
--- a/tests/auto/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
+++ b/tests/auto/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
@@ -209,6 +209,7 @@ void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMe
QSslSocketPtr socket = newSocket();
this->socket = socket;
socket->connectToHostEncrypted(host, 443);
+ QEXPECT_FAIL("", "QTBUG-20983 fails", Abort);
QVERIFY2(socket->waitForEncrypted(), qPrintable(socket->errorString()));
// not using any root certs again -> should not work
diff --git a/tests/auto/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp b/tests/auto/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
index 0338a2f34c..ec5dd8c2d6 100644
--- a/tests/auto/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
+++ b/tests/auto/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
@@ -210,6 +210,7 @@ void tst_QSslSocket_onDemandCertificates_static::onDemandRootCertLoadingStaticMe
QSslSocketPtr socket2 = newSocket();
this->socket = socket2;
socket2->connectToHostEncrypted(host, 443);
+ QEXPECT_FAIL("", "QTBUG-20983 fails", Abort);
QVERIFY2(socket2->waitForEncrypted(), qPrintable(socket2->errorString()));
// not using any root certs again -> should not work
diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp
index 4608019218..08069132de 100644
--- a/tests/auto/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/qstatictext/tst_qstatictext.cpp
@@ -60,6 +60,8 @@ private:
bool supportsTransformations() const;
private slots:
+ void initTestCase();
+
void init();
void cleanup();
@@ -99,8 +101,20 @@ private slots:
void underlinedColor_qtbug20159();
void textDocumentColor();
+
+private:
+ QImage const m_whiteSquare;
};
+void tst_QStaticText::initTestCase()
+{
+ // a "blank" square; we compare against in our testfunctions to verify
+ // that we have actually painted something
+ QPixmap pm(1000, 1000);
+ pm.fill(Qt::white);
+ const_cast<QImage&>(m_whiteSquare) = pm.toImage();
+}
+
void tst_QStaticText::init()
{
}
@@ -169,6 +183,7 @@ void tst_QStaticText::drawToPoint()
p.drawStaticText(QPointF(11, 12 - QFontMetricsF(p.font()).ascent()), text);
}
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -208,6 +223,7 @@ void tst_QStaticText::drawToRect()
imageDrawStaticText.save("drawToRect_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -236,6 +252,17 @@ void tst_QStaticText::prepareToCorrectData()
p.drawStaticText(QPointF(11, 12 - QFontMetricsF(p.font()).ascent()), text);
}
+#if defined(DEBUG_SAVE_IMAGE)
+ imageDrawText.save("prepareToCorrectData_imageDrawText.png");
+ imageDrawStaticText.save("prepareToCorrectData_imageDrawStaticText.png");
+#endif
+
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20977 fails on qpa", Abort);
+#endif
+
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -264,6 +291,7 @@ void tst_QStaticText::prepareToWrongData()
p.drawStaticText(QPointF(11, 12 - QFontMetricsF(p.font()).ascent()), text);
}
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -304,6 +332,7 @@ void tst_QStaticText::setFont()
imageDrawStaticText.save("setFont_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -326,6 +355,7 @@ void tst_QStaticText::setTextWidth()
p.drawStaticText(QPointF(11, 12), text);
}
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -352,6 +382,7 @@ void tst_QStaticText::translatedPainter()
p.drawStaticText(QPointF(11, 12 - QFontMetricsF(p.font()).ascent()), text);
}
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -399,6 +430,8 @@ void tst_QStaticText::rotatedPainter()
imageDrawStaticText.save("rotatedPainter_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -427,6 +460,8 @@ void tst_QStaticText::scaledPainter()
p.drawStaticText(QPointF(11, 12 - QFontMetricsF(p.font()).ascent()), text);
}
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -508,6 +543,8 @@ void tst_QStaticText::rotatedScaledAndTranslatedPainter()
imageDrawStaticText.save("rotatedScaledAndPainter_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -550,6 +587,8 @@ void tst_QStaticText::transformationChanged()
imageDrawStaticText.save("transformationChanged_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -586,6 +625,7 @@ void tst_QStaticText::plainTextVsRichText()
imageRichText.save("plainTextVsRichText_imageRichText.png");
#endif
+ QVERIFY(imagePlainText.toImage() != m_whiteSquare);
QCOMPARE(imagePlainText, imageRichText);
}
@@ -706,6 +746,7 @@ void tst_QStaticText::drawStruckOutText()
imageDrawStaticText.save("drawStruckOutText_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawText, imageDrawStaticText);
}
@@ -740,6 +781,7 @@ void tst_QStaticText::drawOverlinedText()
imageDrawStaticText.save("drawOverlinedText_imageDrawStaticText.png");
#endif
+ QVERIFY(imageDrawText.toImage() != m_whiteSquare);
QCOMPARE(imageDrawText, imageDrawStaticText);
}
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 2bfd41ccd1..92b8812733 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -791,9 +791,7 @@ void tst_QStyleSheetStyle::focusColors()
frame.setLayout(layout);
frame.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&frame);
-#endif
+ QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
widget->setFocus();
QApplication::processEvents();
@@ -855,15 +853,17 @@ void tst_QStyleSheetStyle::hoverColors()
QCursor::setPos(QPoint(0,0));
#endif
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&frame);
-#endif
+ QTest::qWaitForWindowShown(&frame);
QApplication::setActiveWindow(&frame);
QTest::qWait(60);
//move the mouse inside the widget, it should be colored
QTest::mouseMove ( widget, QPoint(5,5));
QTest::qWait(60);
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QCursor::setPos / QTest::mouseMove is not implemented on qpa", Abort);
+#endif
+
QVERIFY(widget->testAttribute(Qt::WA_UnderMouse));
QImage image(frame.width(), frame.height(), QImage::Format_ARGB32);
@@ -959,9 +959,7 @@ void tst_QStyleSheetStyle::background()
QWidget* widget = widgets[c];
widget->show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(widget);
-#endif
+ QTest::qWaitForWindowShown(widget);
QImage image(widget->width(), widget->height(), QImage::Format_ARGB32);
widget->render(&image);
@@ -1302,9 +1300,7 @@ void tst_QStyleSheetStyle::emptyStyleSheet()
layout.addWidget(new QGroupBox("some text", &w));
w.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&w);
-#endif
+ QTest::qWaitForWindowShown(&w);
//workaround the fact that the label sizehint is one pixel different the first time.
label.setIndent(0); //force to recompute the sizeHint:
w.setFocus();
diff --git a/tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp
index 41115fdb34..a4a5ed7ad9 100644
--- a/tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -122,6 +122,10 @@ void tst_QSystemTrayIcon::getSetCheck()
void tst_QSystemTrayIcon::supportsMessages()
{
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20978 QSystemTrayIcon is unimplemented for qpa", Abort);
+#endif
+
#if !defined(Q_WS_QWS)
QCOMPARE(QSystemTrayIcon::supportsMessages(), true );
#else
diff --git a/tests/auto/qtableview/qtableview.pro b/tests/auto/qtableview/qtableview.pro
index 6e7f8a323a..f710fe3773 100644
--- a/tests/auto/qtableview/qtableview.pro
+++ b/tests/auto/qtableview/qtableview.pro
@@ -6,3 +6,4 @@ QT += core-private gui-private
TARGET.EPOCHEAPSIZE = 0x200000 0x800000
SOURCES += tst_qtableview.cpp
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qtcpsocket/test/test.pro b/tests/auto/qtcpsocket/test/test.pro
index 6077610a3f..61bfaad1a1 100644
--- a/tests/auto/qtcpsocket/test/test.pro
+++ b/tests/auto/qtcpsocket/test/test.pro
@@ -30,4 +30,4 @@ win32 {
DESTDIR = ../
}
-
+CONFIG+=insignificant_test # unstable, QTBUG-21043
diff --git a/tests/auto/qtextedit/qtextedit.pro b/tests/auto/qtextedit/qtextedit.pro
index 56a73f6478..fa10ab72a3 100644
--- a/tests/auto/qtextedit/qtextedit.pro
+++ b/tests/auto/qtextedit/qtextedit.pro
@@ -17,3 +17,5 @@ wince* {
} else:!symbian {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qtextlayout/qtextlayout.pro b/tests/auto/qtextlayout/qtextlayout.pro
index 222e69b804..6bf0065e4f 100644
--- a/tests/auto/qtextlayout/qtextlayout.pro
+++ b/tests/auto/qtextlayout/qtextlayout.pro
@@ -9,3 +9,4 @@ symbian {
TARGET.EPOCHEAPSIZE = 100000 20000000
}
+qpa:contains(QT_CONFIG,qpa):CONFIG+=insignificant_test # QTBUG-20979
diff --git a/tests/auto/qtipc/qtipc.pro b/tests/auto/qtipc/qtipc.pro
index e7d2a55cd8..ac647e097b 100644
--- a/tests/auto/qtipc/qtipc.pro
+++ b/tests/auto/qtipc/qtipc.pro
@@ -1,5 +1,6 @@
TEMPLATE=subdirs
-SUBDIRS=\
- qsharedmemory \
- qsystemsemaphore \
-# lackey \ should be moved to QtScript
+# lackey depends on qtscript and the tests depend on lackey :(
+#SUBDIRS=\
+# qsharedmemory \
+# qsystemsemaphore \
+# lackey
diff --git a/tests/auto/qtreeview/qtreeview.pro b/tests/auto/qtreeview/qtreeview.pro
index 9440a660b9..1c310bda76 100644
--- a/tests/auto/qtreeview/qtreeview.pro
+++ b/tests/auto/qtreeview/qtreeview.pro
@@ -2,4 +2,4 @@ load(qttest_p4)
QT += widgets
SOURCES += tst_qtreeview.cpp
-
+contains(QT_CONFIG,xcb):qpa:CONFIG+=insignificant_test # QTBUG-20756 crashes on qpa, xcb
diff --git a/tests/auto/qundogroup/qundogroup.pro b/tests/auto/qundogroup/qundogroup.pro
index 57ccb9e0ab..c2b6ceb038 100644
--- a/tests/auto/qundogroup/qundogroup.pro
+++ b/tests/auto/qundogroup/qundogroup.pro
@@ -2,5 +2,3 @@ CONFIG += qttest_p4
QT += widgets
SOURCES += tst_qundogroup.cpp
TARGET = tst_qundogroup
-
-CONFIG+=insignificant_test
diff --git a/tests/auto/qundogroup/tst_qundogroup.cpp b/tests/auto/qundogroup/tst_qundogroup.cpp
index 55aa73be69..6d51252e22 100644
--- a/tests/auto/qundogroup/tst_qundogroup.cpp
+++ b/tests/auto/qundogroup/tst_qundogroup.cpp
@@ -608,6 +608,11 @@ void tst_QUndoGroup::addStackAndDie()
void tst_QUndoGroup::commandTextFormat()
{
QString binDir = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+
+ if (QProcess::execute(binDir + "/lrelease -version") != 0) {
+ QSKIP("lrelease is missing or broken", SkipAll);
+ }
+
QVERIFY(!QProcess::execute(binDir + "/lrelease testdata/qundogroup.ts"));
QTranslator translator;
diff --git a/tests/auto/qundostack/qundostack.pro b/tests/auto/qundostack/qundostack.pro
index 3d6c1483f5..c8cfb70059 100644
--- a/tests/auto/qundostack/qundostack.pro
+++ b/tests/auto/qundostack/qundostack.pro
@@ -2,5 +2,3 @@ CONFIG += qttest_p4
QT += widgets
SOURCES += tst_qundostack.cpp
TARGET = tst_qundostack
-
-CONFIG+=insignificant_test
diff --git a/tests/auto/qundostack/tst_qundostack.cpp b/tests/auto/qundostack/tst_qundostack.cpp
index 5a09b9a2ae..834c2d5d50 100644
--- a/tests/auto/qundostack/tst_qundostack.cpp
+++ b/tests/auto/qundostack/tst_qundostack.cpp
@@ -2970,6 +2970,11 @@ void tst_QUndoStack::undoLimit()
void tst_QUndoStack::commandTextFormat()
{
QString binDir = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+
+ if (QProcess::execute(binDir + "/lrelease -version") != 0) {
+ QSKIP("lrelease is missing or broken", SkipAll);
+ }
+
QVERIFY(!QProcess::execute(binDir + "/lrelease testdata/qundostack.ts"));
QTranslator translator;
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index 7218921f97..11348e9162 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -119,6 +119,9 @@ static void VERIFY_COLOR(const QRegion &region, const QColor &color)
const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(),
rect.left(), rect.top(),
rect.width(), rect.height());
+#ifdef Q_WS_QPA
+ QEXPECT_FAIL("", "QTBUG-20863 QPixmap::grabWindow unimplemented for qpa", Abort);
+#endif
QCOMPARE(pixmap.size(), rect.size());
QPixmap expectedPixmap(pixmap); /* ensure equal formats */
expectedPixmap.fill(color);
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 1a9542002f..78f0620779 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -42,7 +42,7 @@
#include <QtCore>
#include <QtTest/QtTest>
-#include <QtXml/QXmlStreamReader>
+#include <QtCore/QXmlStreamReader>
#include <private/cycle_p.h>
class tst_Selftests: public QObject
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index 5d5a9c1fd3..26a8f2ab5e 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -45,19 +45,6 @@
#include <QtGui>
-static void qSleep(int msec)
-{
-
- struct Thread : public QThread
- {
- static void wait(int msec)
- {
- QThread::msleep(msec);
- }
- };
- Thread::wait(msec);
-}
-
struct Statistics {
Statistics() : output(0),
setGeometryCount(0), currentBenchmarkIteration(0), relayoutClicked(false), sleepMsecs(0)
@@ -70,7 +57,7 @@ struct Statistics {
QLabel *output;
void sleep()
{
- qSleep(sleepMsecs);
+ QThread::msleep(sleepMsecs);
}
int currentBenchmarkIteration;
bool relayoutClicked;