Closed Bug 1948110 Opened 1 month ago Closed 23 days ago

[wpt-sync] Sync PR 50695 - [testharness.js] Fix issue caused when path contains full stop characters (.)

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 50695 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/50695
Details from upstream follow.

Johannes Odland <johannes.odland@nrk.no> wrote:

[testharness.js] Fix issue caused when path contains full stop characters (.)

https://github.com/web-platform-tests/wpt/issues/50693

The current implementation of get_title() assumes that the path does not contain a full stop character. If it does, get_title() would return parts of the path, in stead of the filename. The pathname /a.path/filename.html would cause get_title() to return .path instead of the expected filename.

This change fixes the issue by trimming the path away before searching for the extension. It maintains the current behavior, where it only keeps the first part of the filename if the filename contains multiple full stop characters. /path/filename.foo.html still causes filename to be returned.

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6302507d57aa [wpt PR 50695] - [testharness.js] Fix issue caused when path contains full stop characters (.), a=testonly
Status: NEW → RESOLVED
Closed: 23 days ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.