tst_QAccessibilityMac: Wait for accessible window to become available
It may take some time before the shown window is available through the accessible hierarchy, so do an asynchronous test for that to happen. Change-Id: I3f312ae636505b805899973678b1bf10a65f96b3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e4147992df243dbd2e7049a109b840928c4f256a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9e31cca206
commit
1c0652da28
@ -419,10 +419,9 @@ void tst_QAccessibilityMac::singleWidgetTest()
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
QVERIFY(appObject);
|
||||
|
||||
NSArray *windows = [appObject windowList];
|
||||
QVERIFY([windows count] == 1);
|
||||
QTRY_VERIFY(appObject.windowList.count == 1);
|
||||
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [windows objectAtIndex: 0];
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [appObject.windowList objectAtIndex: 0];
|
||||
QVERIFY(windowRef != nil);
|
||||
TestAXObject *window = [[TestAXObject alloc] initWithAXUIElementRef: windowRef];
|
||||
|
||||
@ -449,10 +448,9 @@ void tst_QAccessibilityMac::lineEditTest()
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
QVERIFY(appObject);
|
||||
|
||||
NSArray *windowList = [appObject windowList];
|
||||
// one window
|
||||
QVERIFY([windowList count] == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [windowList objectAtIndex: 0];
|
||||
QTRY_VERIFY(appObject.windowList.count == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [appObject.windowList objectAtIndex: 0];
|
||||
QVERIFY(windowRef != nil);
|
||||
TestAXObject *window = [[TestAXObject alloc] initWithAXUIElementRef: windowRef];
|
||||
|
||||
@ -510,10 +508,9 @@ void tst_QAccessibilityMac::hierarchyTest()
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
QVERIFY(appObject);
|
||||
|
||||
NSArray *windowList = [appObject windowList];
|
||||
// one window
|
||||
QVERIFY([windowList count] == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [windowList objectAtIndex: 0];
|
||||
QTRY_VERIFY(appObject.windowList.count == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [appObject.windowList objectAtIndex: 0];
|
||||
QVERIFY(windowRef != nil);
|
||||
TestAXObject *window = [[TestAXObject alloc] initWithAXUIElementRef: windowRef];
|
||||
|
||||
@ -572,10 +569,9 @@ void tst_QAccessibilityMac::notificationsTest()
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
QVERIFY(appObject);
|
||||
|
||||
NSArray *windowList = [appObject windowList];
|
||||
// one window
|
||||
QVERIFY([windowList count] == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [windowList objectAtIndex: 0];
|
||||
QTRY_VERIFY(appObject.windowList.count == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [appObject.windowList objectAtIndex: 0];
|
||||
QVERIFY(windowRef != nil);
|
||||
TestAXObject *window = [[TestAXObject alloc] initWithAXUIElementRef: windowRef];
|
||||
|
||||
@ -616,10 +612,9 @@ void tst_QAccessibilityMac::checkBoxTest()
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
QVERIFY(appObject);
|
||||
|
||||
NSArray *windowList = [appObject windowList];
|
||||
// one window
|
||||
QVERIFY([windowList count] == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [windowList objectAtIndex: 0];
|
||||
QTRY_VERIFY(appObject.windowList.count == 1);
|
||||
AXUIElementRef windowRef = (AXUIElementRef) [appObject.windowList objectAtIndex: 0];
|
||||
QVERIFY(windowRef != nil);
|
||||
TestAXObject *window = [[TestAXObject alloc] initWithAXUIElementRef: windowRef];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user