summaryrefslogtreecommitdiffstats
path: root/testing/xpcshell/selftest.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /testing/xpcshell/selftest.py
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/xpcshell/selftest.py')
-rwxr-xr-xtesting/xpcshell/selftest.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/testing/xpcshell/selftest.py b/testing/xpcshell/selftest.py
index 864eb3e1e2..1919042049 100755
--- a/testing/xpcshell/selftest.py
+++ b/testing/xpcshell/selftest.py
@@ -112,7 +112,7 @@ add_test(function test_loop () {
});
"""
-PASSING_TEST_UNICODE = b"""
+PASSING_TEST_UNICODE = rb"""
function run_test () { run_next_test(); }
add_test(function test_unicode_print () {
@@ -288,7 +288,9 @@ no_such_var = "foo"; // assignment to undeclared variable
# A test that crashes outright.
TEST_CRASHING = """
function run_test () {
- const { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
+ const { ctypes } = ChromeUtils.importESModule(
+ "resource://gre/modules/ctypes.sys.mjs"
+ );
let zero = new ctypes.intptr_t(8);
let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
badptr.contents;
@@ -657,8 +659,8 @@ prefs = [
self.assertInLog("###!!! ASSERTION")
log_lines = self.log.getvalue().splitlines()
- line_pat = "#\d\d:"
- unknown_pat = "#\d\d\: \?\?\?\[.* \+0x[a-f0-9]+\]"
+ line_pat = r"#\d\d:"
+ unknown_pat = r"#\d\d\: \?\?\?\[.* \+0x[a-f0-9]+\]"
self.assertFalse(
any(re.search(unknown_pat, line) for line in log_lines),
"An stack frame without symbols was found in\n%s"