Commit 41dff809 authored by intrigeri's avatar intrigeri

Merge branch 'feature/17121-disable-quantum-bar' into devel (Closes: #17121)

parents ecfad1b6 8c37cc5c
......@@ -51,3 +51,8 @@ pref("browser.download.forbid_open_with", true);
// Disable the Pocket service integration
pref("extensions.pocket.enabled", false);
// Disable the Quantum Bar. In #17121 we found that it can cause the
// URL bar to misbehave (the suggestion pop-up with bookmarks/history/...
// doesn't show up, and pressing Enter doesn't visit the URL).
pref("browser.urlbar.quantumbar", false);
......@@ -20,11 +20,9 @@ end
def xul_application_info(application)
address_bar_image = "BrowserAddressBar.png"
unused_tbb_libs = ['libnssdbm3.so', "libmozavcodec.so", "libmozavutil.so"]
open_url_command = nil
case application
when "Tor Browser"
user = LIVE_USER
open_url_command = '/usr/local/bin/tor-browser'
binary = $vm.execute_successfully(
'echo ${TBB_INSTALL}/firefox.real', :libs => 'tor-browser'
).stdout.chomp
......@@ -72,7 +70,6 @@ def xul_application_info(application)
:address_bar_image => address_bar_image,
:browser_reload_button_image => browser_reload_button_image,
:browser_stop_button_image => browser_stop_button_image,
:open_url_command => open_url_command,
:unused_tbb_libs => unused_tbb_libs,
}
end
......@@ -84,35 +81,19 @@ When /^I open a new tab in the (.*)$/ do |browser|
end
When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
step "I open a new tab in the #{browser}"
info = xul_application_info(browser)
open_url_command = info[:open_url_command]
open_address = Proc.new do
if open_url_command.nil?
step "I open a new tab in the #{browser}"
@screen.click(info[:address_bar_image])
# This static here since we have no reliable visual indicators
# that we can watch to know when typing is "safe".
sleep 5
# The browser sometimes loses keypresses when suggestions are
# shown, which we work around by pasting the address from the
# clipboard, in one go.
$vm.set_clipboard(address)
@screen.type('v', Sikuli::KeyModifier.CTRL)
# Otherwise the "ENTER" key press is sometimes lost.
sleep 5
@screen.type(Sikuli::Key.ENTER)
else
# Avoid fragility of opening URLs via the Tor Browser GUI
# (#17056): typing "Enter" often produces no visible effect on
# slower test systems (be it after typing the URL via Sikuli or
# pasting it as we do for other browsers) and "Paste & Go" does
# not always appear in the right-click address bar context menu.
# There must be some lazy initialization going on, that makes
# the functionality we need not fully work when we need it.
# So let's fallback on emulating the use case when the user
# would click a link in another app.
$vm.execute_successfully("#{open_url_command} '#{address}'", :user => LIVE_USER)
end
@screen.click(info[:address_bar_image])
# This static here since we have no reliable visual indicators
# that we can watch to know when typing is "safe".
sleep 5
# The browser sometimes loses keypresses when suggestions are
# shown, which we work around by pasting the address from the
# clipboard, in one go.
$vm.set_clipboard(address)
@screen.type('v', Sikuli::KeyModifier.CTRL)
@screen.type(Sikuli::Key.ENTER)
end
recovery_on_failure = Proc.new do
@screen.type(Sikuli::Key.ESC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment