summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-03-20 22:02:30 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2019-03-20 22:02:30 +0000
commit762d81d850dcc07478116af986aa3fd8db2fce19 (patch)
tree02c97f3a14f82ac433b7c8a6d7e612e8114bdca7 /tests
parent30799e154333c291899cec8d9ff167755ff592c0 (diff)
parent0f93f145008b84b5f6e266380cab1dbb2f7ab9cd (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginepage/resources/reload.html8
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp8
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc1
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginepage/resources/reload.html b/tests/auto/widgets/qwebenginepage/resources/reload.html
new file mode 100644
index 000000000..d9c33dfcd
--- /dev/null
+++ b/tests/auto/widgets/qwebenginepage/resources/reload.html
@@ -0,0 +1,8 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="2">
+</head>
+<body>
+This is test content
+</body>
+</html>
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 916db3d1e..3792b5522 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -562,11 +562,17 @@ void tst_QWebEnginePage::acceptNavigationRequestNavigationType()
QTRY_COMPARE(loadSpy.count(), 4);
QTRY_COMPARE(page.navigations.count(), 4);
+ page.load(QUrl("qrc:///resources/reload.html"));
+ QTRY_COMPARE(loadSpy.count(), 6);
+ QTRY_COMPARE(page.navigations.count(), 6);
+
QList<QWebEnginePage::NavigationType> expectedList;
expectedList << QWebEnginePage::NavigationTypeTyped
<< QWebEnginePage::NavigationTypeTyped
<< QWebEnginePage::NavigationTypeBackForward
- << QWebEnginePage::NavigationTypeReload;
+ << QWebEnginePage::NavigationTypeReload
+ << QWebEnginePage::NavigationTypeTyped
+ << QWebEnginePage::NavigationTypeOther;
QVERIFY(expectedList.count() == page.navigations.count());
for (int i = 0; i < expectedList.count(); ++i) {
QCOMPARE(page.navigations[i].type, expectedList[i]);
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc
index 757e151c1..cf32486e7 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc
@@ -14,6 +14,7 @@
<file>resources/user.css</file>
<file>resources/image.png</file>
<file>resources/pasteimage.html</file>
+ <file>resources/reload.html</file>
<file>resources/style.css</file>
<file>resources/test1.html</file>
<file>resources/test2.html</file>