Fix Qt 5
This commit is contained in:
parent
242cf2a22e
commit
5ac0cb97a8
|
|
@ -1447,20 +1447,21 @@ def test_version_info(params, stubs, monkeypatch, config_stub):
|
||||||
substitutions['backend'] = 'new QtWebKit (WebKit WEBKIT VERSION)'
|
substitutions['backend'] = 'new QtWebKit (WebKit WEBKIT VERSION)'
|
||||||
else:
|
else:
|
||||||
monkeypatch.delattr(version, 'qtutils.qWebKitVersion', raising=False)
|
monkeypatch.delattr(version, 'qtutils.qWebKitVersion', raising=False)
|
||||||
monkeypatch.setattr(
|
if machinery.IS_QT6:
|
||||||
QWebEngineProfile,
|
monkeypatch.setattr(
|
||||||
"defaultProfile",
|
QWebEngineProfile,
|
||||||
lambda: FakeExtensionProfile(
|
"defaultProfile",
|
||||||
FakeExtensionManager([FakeExtensionInfo("ext1")])
|
lambda: FakeExtensionProfile(
|
||||||
),
|
FakeExtensionManager([FakeExtensionInfo("ext1")])
|
||||||
)
|
),
|
||||||
substitutions['webextensions'] = (
|
)
|
||||||
"\n"
|
substitutions['webextensions'] = (
|
||||||
"WebExtensions:\n"
|
"\n"
|
||||||
" ext1 (ext1-id)\n"
|
"WebExtensions:\n"
|
||||||
" [ ] enabled [ ] loaded [ ] installed\n"
|
" ext1 (ext1-id)\n"
|
||||||
" ext1-path\n"
|
" [ ] enabled [ ] loaded [ ] installed\n"
|
||||||
)
|
" ext1-path\n"
|
||||||
|
)
|
||||||
patches['objects.backend'] = usertypes.Backend.QtWebEngine
|
patches['objects.backend'] = usertypes.Backend.QtWebEngine
|
||||||
substitutions['backend'] = 'QtWebEngine 1.2.3\n (source: faked)'
|
substitutions['backend'] = 'QtWebEngine 1.2.3\n (source: faked)'
|
||||||
|
|
||||||
|
|
@ -1585,6 +1586,9 @@ class TestOpenGLInfo:
|
||||||
assert str(info) == 'OpenGL ES'
|
assert str(info) == 'OpenGL ES'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
not machinery.IS_QT6, reason="extensions are only available with Qt6"
|
||||||
|
)
|
||||||
class TestWebEngineExtensions:
|
class TestWebEngineExtensions:
|
||||||
|
|
||||||
def test_qtwebkit(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
def test_qtwebkit(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue