Tunnel private-browsing to QtWebKit correctly

This commit is contained in:
Florian Bruhin 2016-08-02 14:17:39 +02:00
parent 4a5b5c496f
commit 43ff1b0d97
3 changed files with 26 additions and 2 deletions

View File

@ -80,8 +80,7 @@ def update_settings(section, option):
QWebSettings.setIconDatabasePath('')
else:
QWebSettings.setIconDatabasePath(cache_path)
else:
websettings.update_mappings(MAPPINGS, section, option)
websettings.update_mappings(MAPPINGS, section, option)
def init():

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function check_storage() {
try {
localStorage.qute_test = "foo";
console.log("localstorage works!");
} catch (e) {
console.log("localstorage does not work!");
}
}
</script>
</head>
<body onload="check_storage()">
<p>This page checks local storage on load and logs via console.log</p>
</body>
</html>

View File

@ -471,6 +471,13 @@ Feature: Various utility commands.
And I open cookies in a new tab
Then the cookie qute-test should be set to 42
## https://github.com/The-Compiler/qutebrowser/issues/1742
Scenario: Private browsing is activated in QtWebKit without restart
When I set general -> private-browsing to true
And I open data/javascript/localstorage.html
Then "localstorage does not work!" should be logged via javascript
Scenario: :repeat-command
Given I open data/scroll.html
And I run :tab-only