Add TabbedBrowserStub.current_url()

This commit is contained in:
Florian Bruhin 2018-10-16 11:00:05 +02:00
parent 552db64028
commit 52ceb81a73

View File

@ -502,6 +502,7 @@ class TabbedBrowserStub(QObject):
self.widget = TabWidgetStub()
self.shutting_down = False
self.opened_url = None
self.cur_url = None
def on_tab_close_requested(self, idx):
del self.widget.tabs[idx]
@ -515,6 +516,11 @@ class TabbedBrowserStub(QObject):
def openurl(self, url, *, newtab):
self.opened_url = url
def current_url(self):
if self.current_url is None:
raise ValueError("current_url got called with cur_url None!")
return self.cur_url
class TabWidgetStub(QObject):