From f8c132ffb7cd32d52bbfe09caa811665a3cb1069 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Date: Wed, 5 Oct 2016 12:02:06 +0200
Subject: [PATCH] Speculative stabilization of tst_QWebEnginePage::testJSPrompt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Make sure we start in a well-defined state, and is not in process of
setting up the blank page.

Change-Id: I787db2ef75323bb72a5a6c6fd2e66b268f89b16d
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
---
 tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index a8730ce0d..518713b51 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -2893,6 +2893,9 @@ void tst_QWebEnginePage::testJSPrompt()
 {
     JSPromptPage page;
     bool res;
+    QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
+    page.setHtml(QStringLiteral("<html><body></body></html>"));
+    QTRY_COMPARE(loadSpy.count(), 1);
 
     // OK + QString()
     res = evaluateJavaScriptSync(&page,
-- 
GitLab