Only inherit private mode when window is set
Otherwise, everything calling _open in a private window (like :quickmark-load) will open a new window.
This commit is contained in:
parent
615b027fad
commit
b32223acc7
@ -124,7 +124,7 @@ class CommandDispatcher:
|
|||||||
urlutils.raise_cmdexc_if_invalid(url)
|
urlutils.raise_cmdexc_if_invalid(url)
|
||||||
tabbed_browser = self._tabbed_browser
|
tabbed_browser = self._tabbed_browser
|
||||||
cmdutils.check_exclusive((tab, background, window, private), 'tbwp')
|
cmdutils.check_exclusive((tab, background, window, private), 'tbwp')
|
||||||
if private is None:
|
if window and private is None:
|
||||||
private = self._tabbed_browser.private
|
private = self._tabbed_browser.private
|
||||||
|
|
||||||
if window or private:
|
if window or private:
|
||||||
|
@ -139,3 +139,17 @@ Feature: Using private browsing
|
|||||||
And I open data/hello.txt
|
And I open data/hello.txt
|
||||||
And I run :jseval localStorage.qute_private_test
|
And I run :jseval localStorage.qute_private_test
|
||||||
Then "No output or error" should be logged
|
Then "No output or error" should be logged
|
||||||
|
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user