summaryrefslogtreecommitdiffstats
path: root/testing/firefox-ui/harness/firefox_ui_harness/runners
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/firefox-ui/harness/firefox_ui_harness/runners
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/firefox-ui/harness/firefox_ui_harness/runners')
-rw-r--r--testing/firefox-ui/harness/firefox_ui_harness/runners/__init__.py5
-rw-r--r--testing/firefox-ui/harness/firefox_ui_harness/runners/base.py28
2 files changed, 33 insertions, 0 deletions
diff --git a/testing/firefox-ui/harness/firefox_ui_harness/runners/__init__.py b/testing/firefox-ui/harness/firefox_ui_harness/runners/__init__.py
new file mode 100644
index 0000000000..e2a7ef01f6
--- /dev/null
+++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/__init__.py
@@ -0,0 +1,5 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from firefox_ui_harness.runners.base import FirefoxUITestRunner
diff --git a/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py b/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py
new file mode 100644
index 0000000000..41cfd86544
--- /dev/null
+++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py
@@ -0,0 +1,28 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+
+from marionette_harness import BaseMarionetteTestRunner, MarionetteTestCase
+
+
+class FirefoxUITestRunner(BaseMarionetteTestRunner):
+ def __init__(self, **kwargs):
+ super(FirefoxUITestRunner, self).__init__(**kwargs)
+
+ # select the appropriate GeckoInstance
+ self.app = "fxdesktop"
+
+ # low-noise log messages useful in tests
+ # TODO: should be moved to individual tests once bug 1386810
+ # is fixed
+ moz_log = ""
+ if "MOZ_LOG" in os.environ:
+ moz_log = os.environ["MOZ_LOG"]
+ if len(moz_log) > 0:
+ moz_log += ","
+ moz_log += "UrlClassifierStreamUpdater:1"
+ os.environ["MOZ_LOG"] = moz_log
+
+ self.test_handlers = [MarionetteTestCase]