summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-20 15:41:10 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-30 10:59:39 +0100
commit95ec7e63ceb051a861a08a0885fe26a3c42de424 (patch)
tree45504a1fe2c111dcbf74ce1ce09be7ac91a3506f /tests
parent370855d8f6e1f09710262c76eb00e0e97ed9bde9 (diff)
Switch network-service to default on
Task-number: QTBUG-79890 Task-number: QTBUG-81556 Task-number: QTBUG-81557 Task-number: QTBUG-81614 Change-Id: I4c81ca1b1fb9c9595c1f670706948fcbe65bcd33 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/origins/BLACKLIST3
-rw-r--r--tests/auto/widgets/proxypac/BLACKLIST3
-rw-r--r--tests/auto/widgets/qwebenginepage/BLACKLIST4
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp28
4 files changed, 27 insertions, 11 deletions
diff --git a/tests/auto/widgets/origins/BLACKLIST b/tests/auto/widgets/origins/BLACKLIST
new file mode 100644
index 000000000..db858f11e
--- /dev/null
+++ b/tests/auto/widgets/origins/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-81556
+[mixedXHR]
+*
diff --git a/tests/auto/widgets/proxypac/BLACKLIST b/tests/auto/widgets/proxypac/BLACKLIST
new file mode 100644
index 000000000..42e9f8934
--- /dev/null
+++ b/tests/auto/widgets/proxypac/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-81557
+[proxypac]
+*
diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST
index 9eb90b411..d9d6a03f1 100644
--- a/tests/auto/widgets/qwebenginepage/BLACKLIST
+++ b/tests/auto/widgets/qwebenginepage/BLACKLIST
@@ -3,3 +3,7 @@ osx
[mouseMovementProperties]
windows
+
+# QTBUG-81614
+[setHtmlWithBaseURL]
+*
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index a7a5ba62a..eed9c071a 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -153,17 +153,17 @@ void tst_QWebEngineProfile::testProfile()
void tst_QWebEngineProfile::clearDataFromCache()
{
- QWebEnginePage page;
-
QDir cacheDir("./tst_QWebEngineProfile_cacheDir");
cacheDir.makeAbsolute();
if (cacheDir.exists())
cacheDir.removeRecursively();
cacheDir.mkpath(cacheDir.path());
- QWebEngineProfile *profile = page.profile();
- profile->setCachePath(cacheDir.path());
- profile->setHttpCacheType(QWebEngineProfile::DiskHttpCache);
+ QWebEngineProfile profile(QStringLiteral("Test"));
+ profile.setCachePath(cacheDir.path());
+ profile.setHttpCacheType(QWebEngineProfile::DiskHttpCache);
+
+ QWebEnginePage page(&profile, nullptr);
QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
page.load(QUrl("http://qt-project.org"));
@@ -180,7 +180,7 @@ void tst_QWebEngineProfile::clearDataFromCache()
QSignalSpy directoryChangedSpy(&fileSystemWatcher, SIGNAL(directoryChanged(const QString &)));
// It deletes most of the files, but not all of them.
- profile->clearHttpCache();
+ profile.clearHttpCache();
QTest::qWait(1000);
QTRY_VERIFY(directoryChangedSpy.count() > 0);
@@ -815,26 +815,32 @@ void tst_QWebEngineProfile::initiator()
InitiatorSpy handler;
QWebEngineProfile profile;
profile.installUrlSchemeHandler("foo", &handler);
- QWebEnginePage page(&profile);
+ QWebEnginePage page(&profile, nullptr);
QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
+ page.load(QUrl("about:blank"));
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ loadFinishedSpy.clear();
// about:blank has a unique origin, so initiator should be QUrl("null")
evaluateJavaScriptSync(&page, "window.location = 'foo:bar'");
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ loadFinishedSpy.clear();
QCOMPARE(handler.initiator, QUrl("null"));
page.setHtml("", QUrl("http://test:123/foo%20bar"));
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ loadFinishedSpy.clear();
// baseUrl determines the origin, so QUrl("http://test:123")
evaluateJavaScriptSync(&page, "window.location = 'foo:bar'");
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ loadFinishedSpy.clear();
QCOMPARE(handler.initiator, QUrl("http://test:123"));
// Directly calling load/setUrl should have initiator QUrl(), meaning
// browser-initiated, trusted.
page.load(QUrl("foo:bar"));
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE(loadFinishedSpy.count(), 1);
QCOMPARE(handler.initiator, QUrl());
}