diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 0de06713e4c..37a1f32ca31 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -85,17 +85,6 @@ static HWND winHandleOf(const QWidget *w) # define Q_CHECK_PAINTEVENTS #endif -#ifdef Q_OS_MACOS -#include -bool macHasAccessToWindowsServer() -{ - SecuritySessionId mySession; - SessionAttributeBits sessionInfo; - SessionGetInfo(callerSecuritySession, &mySession, &sessionInfo); - return (sessionInfo & sessionHasGraphicAccess); -} -#endif - #if defined(Q_OS_WIN) static inline void setWindowsAnimationsEnabled(bool enabled) { @@ -3563,15 +3552,7 @@ void tst_QWidget::showMinimizedKeepsFocus() window.showNormal(); QVERIFY(QTest::qWaitForWindowActive(&window)); -#ifdef Q_OS_MACOS - if (!macHasAccessToWindowsServer()) - QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue); -#endif QTRY_COMPARE(window.focusWidget(), firstchild); -#ifdef Q_OS_MACOS - if (!macHasAccessToWindowsServer()) - QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue); -#endif QTRY_COMPARE(QApplication::focusWidget(), firstchild); } } @@ -9636,10 +9617,6 @@ void tst_QWidget::doubleRepaint() QSKIP("QTBUG-52974"); #endif -#if defined(Q_OS_MACOS) - if (!macHasAccessToWindowsServer()) - QSKIP("Not having window server access causes the wrong number of repaints to be issues"); -#endif UpdateWidget widget; widget.setPalette(simplePalette()); widget.setWindowTitle(QLatin1String(QTest::currentTestFunction())); diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index ef00dcaac0f..7a2335896ce 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -413,18 +413,6 @@ void tst_QMdiArea::subWindowActivated() } } -#ifdef Q_OS_MAC -#include -bool macHasAccessToWindowsServer() -{ - SecuritySessionId mySession; - SessionAttributeBits sessionInfo; - SessionGetInfo(callerSecuritySession, &mySession, &sessionInfo); - return (sessionInfo & sessionHasGraphicAccess); -} -#endif - - void tst_QMdiArea::subWindowActivated2() { if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) @@ -481,10 +469,6 @@ void tst_QMdiArea::subWindowActivated2() // Check that we only emit _one_ signal and the active window // is unchanged after showMinimized/showNormal. mdiArea.showMinimized(); -#if defined (Q_OS_MAC) - if (!macHasAccessToWindowsServer()) - QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort); -#endif #ifdef Q_OS_MAC QSKIP("QTBUG-25298: This test is unstable on Mac."); #endif