Use HTML content for localstorage test

JS logging is disabled by QtWebKit in private browsing mode
This commit is contained in:
Florian Bruhin 2016-08-02 15:18:25 +02:00
parent 66709ed1b9
commit 424758a6d1
2 changed files with 5 additions and 4 deletions

View File

@ -3,16 +3,17 @@
<head>
<script type="text/javascript">
function check_storage() {
var elem = document.getElementById("status");
try {
localStorage.qute_test = "foo";
console.log("localstorage works!");
elem.innerHTML = "working";
} catch (e) {
console.log("localstorage does not work!");
elem.innerHTML = "not working";
}
}
</script>
</head>
<body onload="check_storage()">
<p>This page checks local storage on load and logs via console.log</p>
<p>Local storage status: <span id="status">checking...</span></p>
</body>
</html>

View File

@ -476,7 +476,7 @@ Feature: Various utility commands.
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
Then the page should contain the plaintext "Local storage status: not working"
Scenario: :repeat-command
Given I open data/scroll.html