Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
30ee168c
Commit
30ee168c
authored
Jan 30, 2015
by
Tails developers
Browse files
Refactor steps so they are shared between the different browsers.
parent
35b494ca
Changes
6
Hide whitespace changes
Inline
Side-by-side
features/images/UnsafeBrowserAddressBar.png
0 → 120000
View file @
30ee168c
TorBrowserAddressBar.png
\ No newline at end of file
features/images/UnsafeBrowserNewTabButton.png
0 → 100644
View file @
30ee168c
357 Bytes
features/step_definitions/common_steps.rb
View file @
30ee168c
...
...
@@ -553,18 +553,26 @@ def xul_application_info(application)
user
=
$live_user
cmd_regex
=
"
#{
binary
}
.* -profile /home/
#{
user
}
/
\.
tor-browser/profile
\.
default"
chroot
=
""
new_tab_button_image
=
"TorBrowserNewTabButton.png"
address_bar_image
=
"TorBrowserAddressBar.png"
when
"Unsafe Browser"
user
=
"clearnet"
cmd_regex
=
"
#{
binary
}
.* -profile /home/
#{
user
}
/
\.
unsafe-browser/profile
\.
default"
chroot
=
"/var/lib/unsafe-browser/chroot"
new_tab_button_image
=
"UnsafeBrowserNewTabButton.png"
address_bar_image
=
"UnsafeBrowserAddressBar.png"
when
"I2P Browser"
user
=
"i2pbrowser"
cmd_regex
=
"
#{
binary
}
.* -profile /home/
#{
user
}
/
\.
i2p-browser/profile
\.
default"
chroot
=
"/var/lib/i2p-browser/chroot"
new_tab_button_image
=
nil
address_bar_image
=
nil
when
"Tor Launcher"
user
=
"tor-launcher"
cmd_regex
=
"
#{
binary
}
-app /home/
#{
user
}
/
\.
tor-launcher/tor-launcher-standalone/application
\.
ini"
chroot
=
""
new_tab_button_image
=
nil
address_bar_image
=
nil
else
raise
"Invalid browser or XUL application:
#{
application
}
"
end
...
...
@@ -572,9 +580,33 @@ def xul_application_info(application)
:user
=>
user
,
:cmd_regex
=>
cmd_regex
,
:chroot
=>
chroot
,
:new_tab_button_image
=>
new_tab_button_image
,
:address_bar_image
=>
address_bar_image
,
}
end
When
/^I open a new tab in the (.*)$/
do
|
browser
|
next
if
@skip_steps_while_restoring_background
info
=
xul_application_info
(
browser
)
@screen
.
click
(
info
[
:new_tab_button_image
])
@screen
.
wait
(
info
[
:address_bar_image
],
10
)
end
When
/^I open the address "([^"]*)" in the (.*)$/
do
|
address
,
browser
|
next
if
@skip_steps_while_restoring_background
step
"I open a new tab in the
#{
browser
}
"
info
=
xul_application_info
(
browser
)
@screen
.
click
(
info
[
:address_bar_image
])
sleep
0.5
@screen
.
type
(
address
+
Sikuli
::
Key
.
ENTER
)
end
Then
/^the (.*) has no plugins installed$/
do
|
browser
|
next
if
@skip_steps_while_restoring_background
step
"I open the address
\"
about:plugins
\"
in the
#{
browser
}
"
step
"I see
\"
TorBrowserNoPlugins.png
\"
after at most 30 seconds"
end
def
xul_app_shared_lib_check
(
pid
,
chroot
)
expected_absent_tbb_libs
=
[
'libnssdbm3.so'
]
absent_tbb_libs
=
[]
...
...
features/step_definitions/torified_browsing.rb
deleted
100644 → 0
View file @
35b494ca
When
/^I open a new tab in the Tor Browser$/
do
next
if
@skip_steps_while_restoring_background
@screen
.
click
(
"TorBrowserNewTabButton.png"
)
@screen
.
wait
(
"TorBrowserAddressBar.png"
,
10
)
end
When
/^I open the address "([^"]*)" in the Tor Browser$/
do
|
address
|
next
if
@skip_steps_while_restoring_background
step
"I open a new tab in the Tor Browser"
@screen
.
click
(
"TorBrowserAddressBar.png"
)
sleep
0.5
@screen
.
type
(
address
+
Sikuli
::
Key
.
ENTER
)
end
features/step_definitions/unsafe_browser.rb
View file @
30ee168c
...
...
@@ -59,20 +59,6 @@ Then /^I can start the Unsafe Browser again$/ do
step
"I start the Unsafe Browser"
end
When
/^I open a new tab in the Unsafe Browser$/
do
next
if
@skip_steps_while_restoring_background
@screen
.
wait_and_click
(
"UnsafeBrowserWindow.png"
,
10
)
@screen
.
type
(
"t"
,
Sikuli
::
KeyModifier
.
CTRL
)
end
When
/^I open the address "([^"]*)" in the Unsafe Browser$/
do
|
address
|
next
if
@skip_steps_while_restoring_background
step
"I open a new tab in the Unsafe Browser"
@screen
.
type
(
"l"
,
Sikuli
::
KeyModifier
.
CTRL
)
sleep
0.5
@screen
.
type
(
address
+
Sikuli
::
Key
.
ENTER
)
end
Then
/^I cannot configure the Unsafe Browser to use any local proxies$/
do
next
if
@skip_steps_while_restoring_background
@screen
.
wait_and_click
(
"UnsafeBrowserWindow.png"
,
10
)
...
...
features/torified_browsing.feature
View file @
30ee168c
...
...
@@ -31,5 +31,4 @@ Feature: Browsing the web using the Tor Browser
Scenario
:
The Tor Browser should not have any plugins enabled
When
I start the Tor Browser
And
the Tor Browser has started and loaded the startup page
And I open the address "about
:
plugins"
in
the
Tor
Browser
Then
I see
"TorBrowserNoPlugins.png"
after at most 60 seconds
Then
the Tor Browser has no plugins installed
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment