diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-07-18 16:21:38 +0200 |
---|---|---|
committer | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-07-22 12:53:04 +0200 |
commit | 7090472ade970404a1199556b1296d8ac3355d47 (patch) | |
tree | f0ebfcd77b7a556bafc4a77704d560639c5954d3 /tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp | |
parent | f43d9dc448f0fd2073f44ea696205969ffd0d9c8 (diff) |
Fix flaky inputContextQueryInput test
After change 5a6a8509a9 selectionChanged emitted asynchronously. That
means it's not right to assume this signal be emitted after receiving
and processing InputMethodQueries for QPlatformInputContext.
Change-Id: Ibe06bdbb5d39f7805f938740e3925a8e47b95e40
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp')
-rw-r--r-- | tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index d3ea27fc2..a7ff05f55 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -1890,7 +1890,7 @@ void tst_QWebEngineView::inputContextQueryInput() QApplication::sendEvent(view.focusProxy(), &event); } QTRY_COMPARE(testContext.infos.count(), 2); - QCOMPARE(selectionChangedSpy.count(), 1); + QTRY_COMPARE(selectionChangedSpy.count(), 1); // As a first step, Chromium moves the cursor to the start of the selection. // We don't filter this in QtWebEngine because we don't know yet if this is part of a selection. @@ -1916,7 +1916,7 @@ void tst_QWebEngineView::inputContextQueryInput() QApplication::sendEvent(view.focusProxy(), &event); } QTRY_COMPARE(testContext.infos.count(), 1); - QCOMPARE(selectionChangedSpy.count(), 1); + QTRY_COMPARE(selectionChangedSpy.count(), 1); QCOMPARE(testContext.infos[0].cursorPosition, 0); QCOMPARE(testContext.infos[0].anchorPosition, 0); QCOMPARE(testContext.infos[0].surroundingText, QStringLiteral("QtWebEngine!")); |