tests: Make QuteProcess.path_to_url public.
This commit is contained in:
parent
fc328b275a
commit
c861cf54e6
@ -177,7 +177,7 @@ class QuteProc(testprocess.Process):
|
|||||||
'about:blank']
|
'about:blank']
|
||||||
return executable, args
|
return executable, args
|
||||||
|
|
||||||
def _path_to_url(self, path):
|
def path_to_url(self, path):
|
||||||
if path.startswith('about:') or path.startswith('qute:'):
|
if path.startswith('about:') or path.startswith('qute:'):
|
||||||
return path
|
return path
|
||||||
else:
|
else:
|
||||||
@ -227,7 +227,7 @@ class QuteProc(testprocess.Process):
|
|||||||
self.set_setting(sect, opt, old_value)
|
self.set_setting(sect, opt, old_value)
|
||||||
|
|
||||||
def open_path(self, path, new_tab=False):
|
def open_path(self, path, new_tab=False):
|
||||||
url = self._path_to_url(path)
|
url = self.path_to_url(path)
|
||||||
if new_tab:
|
if new_tab:
|
||||||
self.send_cmd(':open -t ' + url)
|
self.send_cmd(':open -t ' + url)
|
||||||
else:
|
else:
|
||||||
@ -242,7 +242,7 @@ class QuteProc(testprocess.Process):
|
|||||||
|
|
||||||
def wait_for_load_finished(self, path, timeout=15000):
|
def wait_for_load_finished(self, path, timeout=15000):
|
||||||
"""Wait until any tab has finished loading."""
|
"""Wait until any tab has finished loading."""
|
||||||
url = self._path_to_url(path)
|
url = self.path_to_url(path)
|
||||||
# We really need the same representation that the webview uses in its
|
# We really need the same representation that the webview uses in its
|
||||||
# __repr__
|
# __repr__
|
||||||
url = utils.elide(QUrl(url).toDisplayString(QUrl.EncodeUnicode), 100)
|
url = utils.elide(QUrl(url).toDisplayString(QUrl.EncodeUnicode), 100)
|
||||||
|
Loading…
Reference in New Issue
Block a user