summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-10-27 12:46:47 +0200
committerMichal Klocek <michal.klocek@qt.io>2023-10-28 01:18:57 +0200
commit889b236e4e2d6ec54d6750e970ef673c487bc18a (patch)
treeb2ea89c96a8ad1a1f14bda9efe0b63721f9d2170
parentea52b98ec79576ed875a095790043844869e8865 (diff)
Skip comboBoxPopupPosition* tests on apple m1
We have constant crashes on apple m1 with those test, skip it for now. Verify window in comboBoxPopupPosition* tests. Pick-to: 6.6 Change-Id: I4b9744fbcae556bc8d17e7602d003f306f54c62d Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index b822cbbd5..154fb523f 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -279,6 +279,9 @@ private:
QWebEngineView* m_view;
QWebEnginePage* m_page;
+ QScopedPointer<QPointingDevice> s_touchDevice =
+ QScopedPointer<QPointingDevice>(QTest::createTouchDevice());
+
QString tmpDirPath() const
{
static QString tmpd = QDir::tempPath() + "/tst_qwebenginepage-"
@@ -286,13 +289,13 @@ private:
return tmpd;
}
- QScopedPointer<QPointingDevice> s_touchDevice;
- void makeClick(QWindow *window, bool withTouch = false, const QPoint &p = QPoint()) {
+ void makeClick(const QPointer<QWindow> window, bool withTouch = false,
+ const QPoint &p = QPoint())
+ {
+ QVERIFY2(window, "window is gone");
if (!withTouch) {
QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(), p);
} else {
- if (!s_touchDevice)
- s_touchDevice.reset(QTest::createTouchDevice());
QTest::touchEvent(window, s_touchDevice.get()).press(1, p);
QTest::touchEvent(window, s_touchDevice.get()).release(1, p);
}
@@ -1361,6 +1364,9 @@ void tst_QWebEnginePage::comboBoxPopupPositionAfterMove_data()
void tst_QWebEnginePage::comboBoxPopupPositionAfterMove()
{
+#if defined(Q_OS_MACOS) && (defined(__arm64__) || defined(__aarch64__))
+ QSKIP("This test crashes for Apple M1");
+#endif
QWebEngineView view;
QTRY_VERIFY(QGuiApplication::primaryScreen());
view.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft());
@@ -1374,7 +1380,7 @@ void tst_QWebEnginePage::comboBoxPopupPositionAfterMove()
QTRY_COMPARE(spyLoadFinished.size(), 1);
const auto oldTlws = QGuiApplication::topLevelWindows();
QFETCH(bool, withTouch);
- QWindow *window = view.windowHandle();
+ QPointer<QWindow> window = view.windowHandle();
auto pos = elementCenter(view.page(), "foo");
makeClick(window, withTouch, pos);
QWindow *popup = nullptr;
@@ -1424,6 +1430,9 @@ void tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove_data()
void tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove()
{
+#if defined(Q_OS_MACOS) && (defined(__arm64__) || defined(__aarch64__))
+ QSKIP("This test crashes for Apple M1");
+#endif
QWidget mainWidget;
mainWidget.setLayout(new QHBoxLayout);
@@ -1448,7 +1457,7 @@ void tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove()
const auto oldTlws = QGuiApplication::topLevelWindows();
QFETCH(bool, withTouch);
- QWindow *window = view.window()->windowHandle();
+ QPointer<QWindow> window = view.window()->windowHandle();
makeClick(window, withTouch, view.mapTo(view.window(), elementCenter(view.page(), "foo")));
QWindow *popup = nullptr;