From 021bb256227574351f5683c8c17f157f643c4eb7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 Mar 2018 22:53:13 +0200 Subject: [PATCH] Add regenerating website to contributing.asciidoc [ci skip] (cherry picked from commit 9f95736bbe4a00c9cc4a8b222ab3dc55d6bdf96c) --- doc/contributing.asciidoc | 4 +++- tests/unit/browser/webkit/test_qt_javascript.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/contributing.asciidoc b/doc/contributing.asciidoc index 2c95c125e..ad48c1324 100644 --- a/doc/contributing.asciidoc +++ b/doc/contributing.asciidoc @@ -687,6 +687,8 @@ as closed. * Linux: Run `git checkout v1.$x.$y && ./.venv/bin/python3 scripts/dev/build_release.py --upload v1.$x.$y`. * Windows: Run `git checkout v1.X.Y; C:\Python36-32\python scripts\dev\build_release.py --asciidoc C:\Python27\python C:\asciidoc-8.6.9\asciidoc.py --upload v1.X.Y` (replace X/Y by hand). * macOS: Run `git checkout v1.X.Y && python3 scripts/dev/build_release.py --upload v1.X.Y` (replace X/Y by hand). -* On server: Run `python3 scripts/dev/download_release.py v1.X.Y` (replace X/Y by hand). +* On server: + - Run `python3 scripts/dev/download_release.py v1.X.Y` (replace X/Y by hand). + - Run `git pull github master && sudo python3 scripts/asciidoc2html.py --website /srv/http/qutebrowser` * Update `qutebrowser-git` PKGBUILD if dependencies/install changed. * Announce to qutebrowser and qutebrowser-announce mailinglist. diff --git a/tests/unit/browser/webkit/test_qt_javascript.py b/tests/unit/browser/webkit/test_qt_javascript.py index 901c373c4..1b1b1e331 100644 --- a/tests/unit/browser/webkit/test_qt_javascript.py +++ b/tests/unit/browser/webkit/test_qt_javascript.py @@ -22,6 +22,8 @@ import pytest +from PyQt5.QtCore import QUrl + @pytest.mark.parametrize('js_enabled, expected', [(True, 2.0), (False, None)]) def test_simple_js_webkit(webview, js_enabled, expected): @@ -49,13 +51,15 @@ def test_element_js_webkit(webview, js_enabled, expected): @pytest.mark.usefixtures('redirect_webengine_data') @pytest.mark.parametrize('js_enabled, expected', [(True, 2.0), (False, 2.0)]) def test_simple_js_webengine(callback_checker, webengineview, js_enabled, - expected): + expected, qapp): """With QtWebEngine, runJavaScript works even when JS is off.""" # If we get there (because of the webengineview fixture) we can be certain # QtWebEngine is available from PyQt5.QtWebEngineWidgets import QWebEngineSettings webengineview.settings().setAttribute(QWebEngineSettings.JavascriptEnabled, js_enabled) + qapp.processEvents() - webengineview.page().runJavaScript('1 + 1', callback_checker.callback) + webengineview.setHtml('') + webengineview.page().runJavaScript('1 + 1', 1, callback_checker.callback) callback_checker.check(expected)