summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2017-02-06 15:36:54 +0100
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2017-05-04 11:18:14 +0000
commitd517c386b295cc81e9af1c9768c50bb7251a8cd6 (patch)
treea288e86aec7747cd097c5d539377f53bccfe4ab5 /tests/auto
parent50acc8680490319c8fe45615c8d6521f0101728b (diff)
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 fafdb171e0c317ee8f871dc7b504d3713d5860eb 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>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp15
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h2
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm19
3 files changed, 0 insertions, 36 deletions
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp
index efa724b730..13c933aa14 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp
@@ -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);
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h
index 5f10513bb5..75b2d39a00 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h
@@ -33,8 +33,6 @@
QT_USE_NAMESPACE
-bool macNativeAccessibilityEnabled();
-bool trusted();
bool testLineEdit();
bool testHierarchy(QWidget *w);
bool singleWidget();
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
index fb030aa4be..e9407fd903 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
@@ -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);