2017-05-10 08:51:48 +02:00
|
|
|
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
|
|
|
|
Feature: Using private browsing
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given I open about:blank
|
|
|
|
And I clean up open tabs
|
|
|
|
|
|
|
|
Scenario: Opening new tab in private window
|
|
|
|
When I open about:blank in a private window
|
2017-05-17 07:54:52 +02:00
|
|
|
And I open cookies/set?qute-private-test=42 without waiting in a new tab
|
|
|
|
And I wait until cookies is loaded
|
|
|
|
And I run :close
|
|
|
|
And I wait for "removed: main-window" in the log
|
|
|
|
And I open cookies
|
|
|
|
Then the cookie qute-private-test should not be set
|
2017-05-10 08:51:48 +02:00
|
|
|
|
|
|
|
Scenario: Opening new tab in private window with :navigate next
|
|
|
|
When I open data/navigate in a private window
|
|
|
|
And I run :navigate -t next
|
|
|
|
And I wait until data/navigate/next.html is loaded
|
2017-05-17 07:54:52 +02:00
|
|
|
And I open cookies/set?qute-private-test=42 without waiting
|
|
|
|
And I wait until cookies is loaded
|
|
|
|
And I run :close
|
|
|
|
And I wait for "removed: main-window" in the log
|
|
|
|
And I open cookies
|
|
|
|
Then the cookie qute-private-test should not be set
|
2017-05-10 08:51:48 +02:00
|
|
|
|
|
|
|
Scenario: Using command history in a new private browsing window
|
|
|
|
When I run :set-cmd-text :message-info "Hello World"
|
|
|
|
And I run :command-accept
|
|
|
|
And I open about:blank in a private window
|
|
|
|
And I run :set-cmd-text :message-error "This should only be shown once"
|
|
|
|
And I run :command-accept
|
|
|
|
And I wait for the error "This should only be shown once"
|
|
|
|
And I run :close
|
2017-05-16 15:46:20 +02:00
|
|
|
And I wait for "removed: main-window" in the log
|
2017-05-10 08:51:48 +02:00
|
|
|
And I run :set-cmd-text :
|
|
|
|
And I run :command-history-prev
|
|
|
|
And I run :command-accept
|
|
|
|
# Then the error should not be shown again
|
|
|
|
|
|
|
|
## https://github.com/qutebrowser/qutebrowser/issues/1219
|
|
|
|
|
|
|
|
@qtwebkit_ng_skip: private browsing is not implemented yet
|
|
|
|
Scenario: Sharing cookies with private browsing
|
|
|
|
When I open cookies/set?qute-test=42 without waiting in a private window
|
|
|
|
And I wait until cookies is loaded
|
|
|
|
And I open cookies in a new tab
|
|
|
|
And I set general -> private-browsing to false
|
|
|
|
Then the cookie qute-test should be set to 42
|
|
|
|
|
|
|
|
Scenario: Opening private window with :navigate increment
|
|
|
|
# Private window handled in commands.py
|
|
|
|
When I open data/numbers/1.txt in a private window
|
|
|
|
And I run :window-only
|
|
|
|
And I run :navigate -w increment
|
|
|
|
And I wait until data/numbers/2.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/numbers/1.txt
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/numbers/2.txt
|
|
|
|
|
|
|
|
Scenario: Opening private window with :navigate next
|
|
|
|
# Private window handled in navigate.py
|
|
|
|
When I open data/navigate in a private window
|
|
|
|
And I run :window-only
|
|
|
|
And I run :navigate -w next
|
|
|
|
And I wait until data/navigate/next.html is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/navigate
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/navigate/next.html
|
|
|
|
|
|
|
|
Scenario: Opening private window with :tab-clone
|
|
|
|
When I open data/hello.txt in a private window
|
|
|
|
And I run :window-only
|
|
|
|
And I run :tab-clone -w
|
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/hello.txt
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/hello.txt
|
|
|
|
|
|
|
|
Scenario: Opening private window via :click-element
|
|
|
|
When I open data/click_element.html in a private window
|
|
|
|
And I run :window-only
|
|
|
|
And I run :click-element --target window id link
|
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/click_element.html
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/hello.txt
|
2017-05-10 22:44:05 +02:00
|
|
|
|
|
|
|
Scenario: Skipping private window when saving session
|
|
|
|
When I open data/hello.txt in a private window
|
|
|
|
And I run :session-save (tmpdir)/session.yml
|
|
|
|
And I wait for "Saved session */session.yml." in the log
|
|
|
|
Then the file session.yml should not contain "hello.txt"
|
2017-05-17 06:28:27 +02:00
|
|
|
|
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/2638
|
|
|
|
Scenario: Turning off javascript with private browsing
|
|
|
|
When I set content -> allow-javascript to false
|
|
|
|
And I open data/javascript/consolelog.html in a private window
|
|
|
|
Then the javascript message "console.log works!" should not be logged
|
2017-05-17 07:54:52 +02:00
|
|
|
|
2017-05-17 20:38:30 +02:00
|
|
|
# Probably needs qutewm to work properly...
|
|
|
|
@qtwebkit_skip: Only applies to QtWebEngine @xfail_norun
|
2017-05-17 07:54:52 +02:00
|
|
|
Scenario: Make sure local storage is isolated with private browsing
|
2017-05-17 13:38:21 +02:00
|
|
|
When I open data/hello.txt in a private window
|
2017-05-17 07:54:52 +02:00
|
|
|
And I run :jseval localStorage.qute_private_test = 42
|
|
|
|
And I wait for "42" in the log
|
|
|
|
And I run :close
|
|
|
|
And I wait for "removed: main-window" in the log
|
2017-05-17 13:38:21 +02:00
|
|
|
And I open data/hello.txt
|
2017-05-17 07:54:52 +02:00
|
|
|
And I run :jseval localStorage.qute_private_test
|
|
|
|
Then "No output or error" should be logged
|
2017-05-29 06:37:28 +02:00
|
|
|
|
|
|
|
Scenario: Opening quickmark in private window
|
|
|
|
When I open data/numbers/1.txt in a private window
|
|
|
|
And I run :window-only
|
|
|
|
And I run :quickmark-add http://localhost:(port)/data/numbers/2.txt two
|
|
|
|
And I run :quickmark-load two
|
|
|
|
And I wait until data/numbers/2.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- private: True
|
|
|
|
tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/numbers/1.txt
|
|
|
|
- url: http://localhost:*/data/numbers/2.txt
|