summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qaccessibilitymac
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-05-07 13:07:34 +0200
committerLiang Qi <liang.qi@qt.io>2017-05-07 13:08:18 +0200
commitd1ea4813458b383e66ce4df69d1833b8b6a279c4 (patch)
tree3bdc16da993e5de56b669e6774fb0748075ddd90 /tests/auto/other/qaccessibilitymac
parent1c87d4e1a1d0e1972f6dc85e55ea9be8a42797ba (diff)
parent0b1ec78c2d4871afcc89d5b046926b88f0819a7c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
Diffstat (limited to 'tests/auto/other/qaccessibilitymac')
-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);