diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-01-08 13:11:59 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-08 23:08:08 +0000 |
commit | 8f6684a01cf6d8a4c203bb44698b0a61bcfa8bd2 (patch) | |
tree | 796703f03d775f969e6f7bed0141bbe25b1f9292 /tests | |
parent | f04389b65574a4ba97a69c5feb6004dcfb171ba7 (diff) |
Stabilize tst_QWebEnginePage::symmetricUrl
The sequence
view.setUrl(dataUrl2);
view.setUrl(dataUrl3);
might result in a navigation entry for dataUrl2 or not, depending on
whether the first call completes before the second call would
overwrite the pending load.
Change-Id: I487ada16517daa218078af007083a68c01697c9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 8fb76492e..82fe03344 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -3799,7 +3799,10 @@ void tst_QWebEnginePage::symmetricUrl() QTRY_VERIFY(loadFinishedSpy.count() >= 2); QTRY_COMPARE(loadFinishedSpy.count(), 3); - QCOMPARE(view.history()->count(), 2); + // setUrl(dataUrl3) might stop Chromium from adding a navigation entry for dataUrl2, + // depending on whether the load of dataUrl2 could be completed in time. + QVERIFY(view.history()->count() >= 2); + QVERIFY(view.history()->count() <= 3); QCOMPARE(toPlainTextSync(view.page()), QString("Test3")); } |