diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-08-02 15:18:25 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-08-02 15:18:58 +0200 |
commit | 8e7a1d3d970ce4e2c48a0437841d11898c1ffb8d (patch) | |
tree | 981ef17c3344ba162db347c52eed1df26acd46b7 | |
parent | 98704c0471a57a2787ea17a0abd7b5c94542060f (diff) | |
download | qutebrowser-8e7a1d3d970ce4e2c48a0437841d11898c1ffb8d.tar.gz qutebrowser-8e7a1d3d970ce4e2c48a0437841d11898c1ffb8d.zip |
Use HTML content for localstorage test
JS logging is disabled by QtWebKit in private browsing mode
-rw-r--r-- | tests/end2end/data/javascript/localstorage.html | 7 | ||||
-rw-r--r-- | tests/end2end/features/misc.feature | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/end2end/data/javascript/localstorage.html b/tests/end2end/data/javascript/localstorage.html index 9f8170610..28a11f24f 100644 --- a/tests/end2end/data/javascript/localstorage.html +++ b/tests/end2end/data/javascript/localstorage.html @@ -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> diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 2f87721a6..1519e1867 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -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 |