Issue #23262: The webbrowser module now supports Firefox 36+ and derived
browsers. Based on patch by Oleg Broytman.
This commit is contained in:
commit
08921c4be3
|
@ -93,6 +93,31 @@ class MozillaCommandTest(CommandTestMixin, unittest.TestCase):
|
||||||
|
|
||||||
browser_class = webbrowser.Mozilla
|
browser_class = webbrowser.Mozilla
|
||||||
|
|
||||||
|
def test_open(self):
|
||||||
|
self._test('open',
|
||||||
|
options=[],
|
||||||
|
arguments=[URL])
|
||||||
|
|
||||||
|
def test_open_with_autoraise_false(self):
|
||||||
|
self._test('open', kw=dict(autoraise=False),
|
||||||
|
options=[],
|
||||||
|
arguments=[URL])
|
||||||
|
|
||||||
|
def test_open_new(self):
|
||||||
|
self._test('open_new',
|
||||||
|
options=[],
|
||||||
|
arguments=['-new-window', URL])
|
||||||
|
|
||||||
|
def test_open_new_tab(self):
|
||||||
|
self._test('open_new_tab',
|
||||||
|
options=[],
|
||||||
|
arguments=['-new-tab', URL])
|
||||||
|
|
||||||
|
|
||||||
|
class NetscapeCommandTest(CommandTestMixin, unittest.TestCase):
|
||||||
|
|
||||||
|
browser_class = webbrowser.Netscape
|
||||||
|
|
||||||
def test_open(self):
|
def test_open(self):
|
||||||
self._test('open',
|
self._test('open',
|
||||||
options=['-raise', '-remote'],
|
options=['-raise', '-remote'],
|
||||||
|
|
|
@ -245,7 +245,17 @@ class UnixBrowser(BaseBrowser):
|
||||||
|
|
||||||
|
|
||||||
class Mozilla(UnixBrowser):
|
class Mozilla(UnixBrowser):
|
||||||
"""Launcher class for Mozilla/Netscape browsers."""
|
"""Launcher class for Mozilla browsers."""
|
||||||
|
|
||||||
|
remote_args = ['%action', '%s']
|
||||||
|
remote_action = ""
|
||||||
|
remote_action_newwin = "-new-window"
|
||||||
|
remote_action_newtab = "-new-tab"
|
||||||
|
background = True
|
||||||
|
|
||||||
|
|
||||||
|
class Netscape(UnixBrowser):
|
||||||
|
"""Launcher class for Netscape browser."""
|
||||||
|
|
||||||
raise_opts = ["-noraise", "-raise"]
|
raise_opts = ["-noraise", "-raise"]
|
||||||
remote_args = ['-remote', 'openURL(%s%action)']
|
remote_args = ['-remote', 'openURL(%s%action)']
|
||||||
|
@ -254,8 +264,6 @@ class Mozilla(UnixBrowser):
|
||||||
remote_action_newtab = ",new-tab"
|
remote_action_newtab = ",new-tab"
|
||||||
background = True
|
background = True
|
||||||
|
|
||||||
Netscape = Mozilla
|
|
||||||
|
|
||||||
|
|
||||||
class Galeon(UnixBrowser):
|
class Galeon(UnixBrowser):
|
||||||
"""Launcher class for Galeon/Epiphany browsers."""
|
"""Launcher class for Galeon/Epiphany browsers."""
|
||||||
|
@ -430,14 +438,18 @@ def register_X_browsers():
|
||||||
if shutil.which("x-www-browser"):
|
if shutil.which("x-www-browser"):
|
||||||
register("x-www-browser", None, BackgroundBrowser("x-www-browser"))
|
register("x-www-browser", None, BackgroundBrowser("x-www-browser"))
|
||||||
|
|
||||||
# The Mozilla/Netscape browsers
|
# The Mozilla browsers
|
||||||
for browser in ("mozilla-firefox", "firefox",
|
for browser in ("firefox", "iceweasel", "iceape", "seamonkey"):
|
||||||
"mozilla-firebird", "firebird",
|
|
||||||
"iceweasel", "iceape",
|
|
||||||
"seamonkey", "mozilla", "netscape"):
|
|
||||||
if shutil.which(browser):
|
if shutil.which(browser):
|
||||||
register(browser, None, Mozilla(browser))
|
register(browser, None, Mozilla(browser))
|
||||||
|
|
||||||
|
# The Netscape and old Mozilla browsers
|
||||||
|
for browser in ("mozilla-firefox",
|
||||||
|
"mozilla-firebird", "firebird",
|
||||||
|
"mozilla", "netscape"):
|
||||||
|
if shutil.which(browser):
|
||||||
|
register(browser, None, Netscape(browser))
|
||||||
|
|
||||||
# Konqueror/kfm, the KDE browser.
|
# Konqueror/kfm, the KDE browser.
|
||||||
if shutil.which("kfm"):
|
if shutil.which("kfm"):
|
||||||
register("kfm", Konqueror, Konqueror("kfm"))
|
register("kfm", Konqueror, Konqueror("kfm"))
|
||||||
|
|
|
@ -99,6 +99,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
|
||||||
|
browsers. Based on patch by Oleg Broytman.
|
||||||
|
|
||||||
- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
|
- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
|
||||||
by representing the scale as float value internally in Tk. tkinter.IntVar
|
by representing the scale as float value internally in Tk. tkinter.IntVar
|
||||||
now works if float value is set to underlying Tk variable.
|
now works if float value is set to underlying Tk variable.
|
||||||
|
|
Loading…
Reference in New Issue