Commit 3cf1f154 authored by Bumsik Kim's avatar Bumsik Kim Committed by Pablo Galindo

bpo-34019: Fix wrong arguments for Opera Browser (#8047)

The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL.
parent 23401fb9
...@@ -170,23 +170,23 @@ class OperaCommandTest(CommandTestMixin, unittest.TestCase): ...@@ -170,23 +170,23 @@ class OperaCommandTest(CommandTestMixin, unittest.TestCase):
def test_open(self): def test_open(self):
self._test('open', self._test('open',
options=['-remote'], options=[],
arguments=['openURL({})'.format(URL)]) arguments=[URL])
def test_open_with_autoraise_false(self): def test_open_with_autoraise_false(self):
self._test('open', kw=dict(autoraise=False), self._test('open', kw=dict(autoraise=False),
options=['-remote', '-noraise'], options=[],
arguments=['openURL({})'.format(URL)]) arguments=[URL])
def test_open_new(self): def test_open_new(self):
self._test('open_new', self._test('open_new',
options=['-remote'], options=['--new-window'],
arguments=['openURL({},new-window)'.format(URL)]) arguments=[URL])
def test_open_new_tab(self): def test_open_new_tab(self):
self._test('open_new_tab', self._test('open_new_tab',
options=['-remote'], options=[],
arguments=['openURL({},new-page)'.format(URL)]) arguments=[URL])
class ELinksCommandTest(CommandTestMixin, unittest.TestCase): class ELinksCommandTest(CommandTestMixin, unittest.TestCase):
......
...@@ -308,11 +308,10 @@ Chromium = Chrome ...@@ -308,11 +308,10 @@ Chromium = Chrome
class Opera(UnixBrowser): class Opera(UnixBrowser):
"Launcher class for Opera browser." "Launcher class for Opera browser."
raise_opts = ["-noraise", ""] remote_args = ['%action', '%s']
remote_args = ['-remote', 'openURL(%s%action)']
remote_action = "" remote_action = ""
remote_action_newwin = ",new-window" remote_action_newwin = "--new-window"
remote_action_newtab = ",new-page" remote_action_newtab = ""
background = True background = True
......
webbrowser: Correct the arguments passed to Opera Browser when opening a new URL
using the ``webbrowser`` module. Patch by Bumsik Kim.
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