From 25921792efffe81deb5a1b36cdbd3e550abad739 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 12 Nov 2015 21:52:03 +0100 Subject: [PATCH] =?UTF-8?q?tests:=20Allow=20to=20open=20about:=E2=80=A6/qu?= =?UTF-8?q?te:=E2=80=A6=20in=20QuteProc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/integration/quteprocess.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 622c3511d..2ccdbc54c 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -177,6 +177,12 @@ class QuteProc(testprocess.Process): 'about:blank'] return executable, args + def _path_to_url(self, path): + if path.startswith('about:') or path.startswith('qute:'): + return path + else: + return 'http://localhost:{}/{}'.format(self._httpbin.port, path) + def after_test(self): bad_msgs = [msg for msg in self._data if msg.loglevel > logging.INFO and not msg.expected] @@ -199,7 +205,7 @@ class QuteProc(testprocess.Process): self.wait_for(category='config', message='Config option changed: *') def open_path(self, path, new_tab=False): - url = 'http://localhost:{}/{}'.format(self._httpbin.port, path) + url = self._path_to_url(path) if new_tab: self.send_cmd(':open -t ' + url) else: @@ -222,7 +228,7 @@ class QuteProc(testprocess.Process): def wait_for_load_finished(self, path, timeout=15000): """Wait until any tab has finished loading.""" - url = 'http://localhost:{}/{}'.format(self._httpbin.port, path) + url = self._path_to_url(path) pattern = re.compile( r"(load status for : LoadStatus.success|fetch: "