diff options
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 6 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 4 | ||||
-rw-r--r-- | tests/auto/widgets/origins/BLACKLIST | 3 | ||||
-rw-r--r-- | tests/auto/widgets/proxypac/BLACKLIST | 3 | ||||
-rw-r--r-- | tests/auto/widgets/qwebenginepage/BLACKLIST | 4 | ||||
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 28 |
6 files changed, 32 insertions, 16 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 2d0481978..aaaeb277b 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -854,6 +854,8 @@ void ProfileIODataQt::CreateRestrictedCookieManager(network::mojom::RestrictedCo network::mojom::NetworkContextParamsPtr ProfileIODataQt::CreateNetworkContextParams() { + updateStorageSettings(); + network::mojom::NetworkContextParamsPtr network_context_params = SystemNetworkContextManager::GetInstance()->CreateDefaultNetworkContextParams(); @@ -886,8 +888,6 @@ network::mojom::NetworkContextParamsPtr ProfileIODataQt::CreateNetworkContextPar network_context_params->enable_ftp_url_support = true; #endif // !BUILDFLAG(DISABLE_FTP_SUPPORT) -// proxy_config_monitor_.AddToNetworkContextParams(network_context_params.get()); - // network_context_params->enable_certificate_reporting = true; // network_context_params->enable_expect_ct_reporting = true; network_context_params->enforce_chrome_ct_policy = false; @@ -899,7 +899,7 @@ network::mojom::NetworkContextParamsPtr ProfileIODataQt::CreateNetworkContextPar m_profile->GetSharedCorsOriginAccessList()->GetOriginAccessList().CreateCorsOriginAccessPatternsList(); } - m_proxyConfigMonitor->AddToNetworkContextParams(&*network_context_params); + m_proxyConfigMonitor->AddToNetworkContextParams(network_context_params.get()); return network_context_params; } diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index e84844fdb..08e7f2b41 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -541,8 +541,8 @@ WebEngineContext::WebEngineContext() appendToFeatureList(disableFeatures, features::kMojoVideoCapture.name); // We do not yet fully support the network-service, but it has been enabled by default since 75. - bool enableNetworkService = parsedCommandLine->HasSwitch("enable-network-service"); - parsedCommandLine->RemoveSwitch("enable-network-service"); + bool enableNetworkService = !parsedCommandLine->HasSwitch("disable-network-service"); + parsedCommandLine->RemoveSwitch("disable-network-service"); if (!enableNetworkService) appendToFeatureList(disableFeatures, network::features::kNetworkService.name); 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()); } |