Stabilize Accessibility/Combo test.
The Windows combo animation causes a delay, introduce QTRY_VERIFY. Fix warnings about being unable to set geometry on Windows. Change-Id: I52ca960c06f023ade3afe85f31deaf8e32edff26 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
83aa1a2103
commit
d738595d71
@ -2822,7 +2822,10 @@ void tst_QAccessibility::comboBoxTest()
|
|||||||
{ // not editable combobox
|
{ // not editable combobox
|
||||||
QComboBox combo;
|
QComboBox combo;
|
||||||
combo.addItems(QStringList() << "one" << "two" << "three");
|
combo.addItems(QStringList() << "one" << "two" << "three");
|
||||||
|
// Fully decorated windows have a minimum width of 160 on Windows.
|
||||||
|
combo.setMinimumWidth(200);
|
||||||
combo.show();
|
combo.show();
|
||||||
|
QVERIFY(QTest::qWaitForWindowShown(&combo));
|
||||||
|
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&combo);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&combo);
|
||||||
QCOMPARE(verifyHierarchy(iface), 0);
|
QCOMPARE(verifyHierarchy(iface), 0);
|
||||||
@ -2848,13 +2851,14 @@ void tst_QAccessibility::comboBoxTest()
|
|||||||
QVERIFY(iface->actionInterface());
|
QVERIFY(iface->actionInterface());
|
||||||
QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction());
|
QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction());
|
||||||
iface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
|
iface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
|
||||||
QVERIFY(combo.view()->isVisible());
|
QTRY_VERIFY(combo.view()->isVisible());
|
||||||
|
|
||||||
delete iface;
|
delete iface;
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // editable combobox
|
{ // editable combobox
|
||||||
QComboBox editableCombo;
|
QComboBox editableCombo;
|
||||||
|
editableCombo.setMinimumWidth(200);
|
||||||
editableCombo.show();
|
editableCombo.show();
|
||||||
editableCombo.setEditable(true);
|
editableCombo.setEditable(true);
|
||||||
editableCombo.addItems(QStringList() << "foo" << "bar" << "baz");
|
editableCombo.addItems(QStringList() << "foo" << "bar" << "baz");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user