summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2023-08-28 15:56:34 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-28 20:26:26 +0000
commit3740e21006344bd3a72ddf0c053a9d52959b8bbc (patch)
tree21c364723c4fa77dd5ee0ccc062ccc84a43be88d
parent9e02aecdc2429e9b9c13b76b1b5706d9d6393287 (diff)
Remove obsolete code from qscreencapture tests
The tests have been already implemented in tst_qwindowcapturebackend Change-Id: I484a433f81d8eab16fca7ee88cf3782bf34e7250 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit de2c88946f3d12bbca47bbc19552dd4ad0bebd7d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/integration/qscreencapture_integration/tst_qscreencapture_integration.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/auto/integration/qscreencapture_integration/tst_qscreencapture_integration.cpp b/tests/auto/integration/qscreencapture_integration/tst_qscreencapture_integration.cpp
index cca18cf3f..717a6d61e 100644
--- a/tests/auto/integration/qscreencapture_integration/tst_qscreencapture_integration.cpp
+++ b/tests/auto/integration/qscreencapture_integration/tst_qscreencapture_integration.cpp
@@ -118,12 +118,6 @@ class tst_QScreenCaptureIntegration : public QObject
private slots:
void initTestCase();
void setActive_startsAndStopsCapture();
-#if 0 // to be reimplemented with QWindowCapture
- void setWindowId_selectsCaptureWindow();
- void setWindow_selectsCaptureWindow();
- void setWindow_selectsWindow_whenWindowIsOverlapped();
- void capture_fails_whenCapturedWindowIsRemoved();
-#endif
void setScreen_selectsScreen_whenCalledWithWidgetsScreen();
void constructor_selectsPrimaryScreenAsDefault();
void setScreen_selectsSecondaryScreen_whenCalledWithSecondaryScreen();
@@ -309,64 +303,6 @@ void tst_QScreenCaptureIntegration::initTestCase()
QSKIP("Screen capturing not supported");
}
-#if 0 // to be reimplemented with QWindowCapture
-void tst_QScreenCaptureIntegration::setWindowId_selectsCaptureWindow()
-{
-#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
- QSKIP("It is not the underlying windowing system");
-#endif
- auto widget = QTestWidget::createAndShow(Qt::Window | Qt::FramelessWindowHint,
- QRect{ 200, 100, 430, 351 });
- QVERIFY(QTest::qWaitForWindowExposed(widget.get()));
-
- capture(*widget, { 0, 0 }, { 430, 351 },
- [&widget](QScreenCapture &sc) { sc.setWindowId(widget->winId()); });
-}
-
-void tst_QScreenCaptureIntegration::setWindow_selectsCaptureWindow()
-{
-#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
- QSKIP("It is not the underlying windowing system");
-#endif
- auto widget = QTestWidget::createAndShow(Qt::Window | Qt::FramelessWindowHint,
- QRect{ 200, 100, 430, 351 });
- QVERIFY(QTest::qWaitForWindowExposed(widget.get()));
-
- capture(*widget, { 0, 0 }, { 430, 351 },
- [&widget](QScreenCapture &sc) { sc.setWindow(widget->windowHandle()); });
-}
-
-void tst_QScreenCaptureIntegration::setWindow_selectsWindow_whenWindowIsOverlapped()
-{
-#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
- QSKIP("It is not the underlying windowing system");
-#endif
- auto overlappedWidget = QTestWidget::createAndShow(Qt::Window | Qt::FramelessWindowHint,
- QRect{ 200, 100, 430, 351 });
- QVERIFY(QTest::qWaitForWindowExposed(overlappedWidget.get()));
-
- auto overlappingWidget = QTestWidget::createAndShow(Qt::Window | Qt::FramelessWindowHint,
- QRect{ 210, 110, 430, 351 });
- QVERIFY(QTest::qWaitForWindowExposed(overlappingWidget.get()));
-
- capture(*overlappedWidget, { 0, 0 }, { 430, 351 }, [&overlappedWidget](QScreenCapture &sc) {
- sc.setWindow(overlappedWidget->windowHandle());
- });
-}
-
-void tst_QScreenCaptureIntegration::capture_fails_whenCapturedWindowIsRemoved()
-{
-#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
- QSKIP("It is not the underlying windowing system");
-#endif
- auto widget = QTestWidget::createAndShow(Qt::Window, QRect{ 200, 100, 430, 351 });
- QVERIFY(QTest::qWaitForWindowExposed(widget.get()));
-
- removeWhileCapture([&widget](QScreenCapture &sc) { sc.setWindowId(widget->winId()); },
- [&widget]() { widget.reset(); });
-}
-#endif
-
void tst_QScreenCaptureIntegration::setScreen_selectsScreen_whenCalledWithWidgetsScreen()
{
auto widget = QTestWidget::createAndShow(Qt::Window | Qt::FramelessWindowHint