From d738595d71a68cc294dc0b1b368eb22ae0ecc23a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 11 Oct 2012 14:46:16 +0200 Subject: [PATCH] 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 Reviewed-by: Marc Mutz --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 0166d59..08d6797 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -2822,7 +2822,10 @@ void tst_QAccessibility::comboBoxTest() { // not editable combobox QComboBox combo; combo.addItems(QStringList() << "one" << "two" << "three"); + // Fully decorated windows have a minimum width of 160 on Windows. + combo.setMinimumWidth(200); combo.show(); + QVERIFY(QTest::qWaitForWindowShown(&combo)); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&combo); QCOMPARE(verifyHierarchy(iface), 0); @@ -2848,13 +2851,14 @@ void tst_QAccessibility::comboBoxTest() QVERIFY(iface->actionInterface()); QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction()); iface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction()); - QVERIFY(combo.view()->isVisible()); + QTRY_VERIFY(combo.view()->isVisible()); delete iface; } { // editable combobox QComboBox editableCombo; + editableCombo.setMinimumWidth(200); editableCombo.show(); editableCombo.setEditable(true); editableCombo.addItems(QStringList() << "foo" << "bar" << "baz"); -- 2.7.4