Closed Bug 1982960 Opened 10 months ago Closed 10 months ago

uriloader/exthandler/tests/unit/test_filename_sanitize.js fails on android 14 emulator

Categories

(Firefox :: File Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: jmaher, Assigned: Gijs)

References

Details

Attachments

(1 file)

on this try push, I see a perma fail for uriloader/exthandler/tests/unit/test_filename_sanitize.js on opt and debugbuilds.

you can see in the log file, an error like this:

[task 2025-08-12T14:29:43.281+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 236] Should get video.ogv or video.ogm for video.ogt, got video.ogv - true == true
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 241] audio.mp3 - "audio.mp3" == "audio.mp3"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 246] audio.mpega - "audio.mpega" == "audio.mpega"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 251] audio.mp2 - "audio.mp2" == "audio.mp2"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 257] audio.mp4 - "audio.mp4" == "audio.mp4"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  TEST-PASS | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 263] sound.m4a - "sound.m4a" == "sound.m4a"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43  WARNING -  TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/unit/test_filename_sanitize.js | validate_filename_method - [validate_filename_method : 268] sound.m4b - "sound.m4b" == "sound.m4a"
[task 2025-08-12T14:29:43.282+00:00] 14:29:43     INFO -  test_filename_sanitize.js:validate_filename_method:268
[task 2025-08-12T14:29:43.283+00:00] 14:29:43     INFO -  /data/local/tmp/test_root/xpc/head.js:_run_next_test/<:1847

I am planning to disable this test on android 14 in bug 1982952.

there is a platofm conditional there already https://searchfox.org/firefox-main/rev/60308bc3792ef201b82377682de068a5a1c72575/uriloader/exthandler/tests/unit/test_filename_sanitize.js#270
I think Android 14 added native support for .m4b and then the conditional should take that into account

Do you know how complicate would it be to pass down the android version info to xpcshell? I see it's in mozinfo and it's used for manifest parsing, but I don't think it's available from xpcshell code? (though maybe I missed it)

Flags: needinfo?(jmaher)

the platform is in appconstants which comes from https://searchfox.org/firefox-main/source/testing/xpcshell/head.js#46

I think this simplest way is to pass mozinfo in as a pref and parse that (reftest example)

Are you thinking of adjusting a specific check based on os_version?

Flags: needinfo?(jmaher)

Yeah, since Android 14 has a different behavior, it may be worth also for the future to be able to adapt tests to different versions.

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gijskruitbosch+bugs)

I think we can use something like:

Services.vc.compare("14", Services.sysinfo.get("release_version"))

which will return 0 on 14, and -1 on newer versions.

Flags: needinfo?(gijskruitbosch+bugs)

Gijs also found isPlatformAndVersionAtLeast and isPlatformAndVersionAtMost, for Android it will use the api level, that is kind of mapped to android versions

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3
Pushed by gijskruitbosch@gmail.com: https://github.com/mozilla-firefox/firefox/commit/e2d7d21bcd6e https://hg.mozilla.org/integration/autoland/rev/1e4cb700e9ea update old android check in test_filename_sanitize.js for Android 14 and later, r=mak
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: