Enable tst_qaccessibilitymac
The test was disabled because it was checking if we had the right
permissions. It does seem as if the permissions do not matter as
long as everything is in process though.
As seen by the regression in fafdb171e0
it's important to run the test. This regression would have been
caught.
Change-Id: Ia1938e683badd1de2657aa6dc8a3b3bbe430e8c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
50acc86804
commit
d517c386b2
@ -94,9 +94,6 @@ void tst_QAccessibilityMac::cleanup()
|
||||
|
||||
void tst_QAccessibilityMac::singleWidgetTest()
|
||||
{
|
||||
if (!macNativeAccessibilityEnabled())
|
||||
return;
|
||||
|
||||
delete m_window;
|
||||
m_window = 0;
|
||||
|
||||
@ -105,9 +102,6 @@ void tst_QAccessibilityMac::singleWidgetTest()
|
||||
|
||||
void tst_QAccessibilityMac::lineEditTest()
|
||||
{
|
||||
if (!macNativeAccessibilityEnabled())
|
||||
return;
|
||||
|
||||
QLineEdit *lineEdit = new QLineEdit(m_window);
|
||||
lineEdit->setText("a11y test QLineEdit");
|
||||
m_window->addWidget(lineEdit);
|
||||
@ -119,9 +113,6 @@ void tst_QAccessibilityMac::lineEditTest()
|
||||
|
||||
void tst_QAccessibilityMac::hierarchyTest()
|
||||
{
|
||||
if (!macNativeAccessibilityEnabled())
|
||||
return;
|
||||
|
||||
QWidget *w = new QWidget(m_window);
|
||||
m_window->addWidget(w);
|
||||
|
||||
@ -141,17 +132,11 @@ void tst_QAccessibilityMac::hierarchyTest()
|
||||
|
||||
void tst_QAccessibilityMac::notificationsTest()
|
||||
{
|
||||
if (!macNativeAccessibilityEnabled())
|
||||
return;
|
||||
|
||||
QVERIFY(notifications(m_window));
|
||||
}
|
||||
|
||||
void tst_QAccessibilityMac::checkBoxTest()
|
||||
{
|
||||
if (!macNativeAccessibilityEnabled())
|
||||
return;
|
||||
|
||||
QCheckBox *cb = new QCheckBox(m_window);
|
||||
cb->setText("Great option");
|
||||
m_window->addWidget(cb);
|
||||
|
@ -33,8 +33,6 @@
|
||||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
bool macNativeAccessibilityEnabled();
|
||||
bool trusted();
|
||||
bool testLineEdit();
|
||||
bool testHierarchy(QWidget *w);
|
||||
bool singleWidget();
|
||||
|
@ -42,19 +42,6 @@
|
||||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
bool macNativeAccessibilityEnabled()
|
||||
{
|
||||
bool enabled = AXAPIEnabled();
|
||||
if (!enabled)
|
||||
qWarning() << "Accessibility is disabled (check System Preferences) skipping test.";
|
||||
return enabled;
|
||||
}
|
||||
|
||||
bool trusted()
|
||||
{
|
||||
return AXIsProcessTrusted();
|
||||
}
|
||||
|
||||
struct AXErrorTag {
|
||||
AXError err;
|
||||
explicit AXErrorTag(AXError theErr) : err(theErr) {}
|
||||
@ -413,12 +400,6 @@ bool singleWidget()
|
||||
|
||||
bool testLineEdit()
|
||||
{
|
||||
// not sure if this is needed. on my machine the calls succeed.
|
||||
// NSString *path = @"/Users/frederik/qt5/qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.app/Contents/MacOS/tst_qaccessibilitymac";
|
||||
// NSString *path = @"/Users/frederik/qt5/qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.app";
|
||||
// AXError e = AXMakeProcessTrusted((CFStringRef) path);
|
||||
// NSLog(@"error: %i", e);
|
||||
|
||||
TestAXObject *appObject = [TestAXObject getApplicationAXObject];
|
||||
EXPECT(appObject);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user