Closed Bug 1984904 Opened 7 months ago Closed 7 months ago

[wpt-sync] Sync PR 54491 - feat(html): Add test for multiple title elements

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Deepith N <135017639+deepith-18@users.noreply.github.com> wrote:

feat(html): Add test for multiple title elements

This pull request adds a new test to verify browser behavior when a document contains more than one <title> element.

According to the HTML specification, if multiple <title> elements are present, all but the first one must be ignored by the browser. This test confirms that document.title correctly reflects the content of the first <title> tag in such a scenario.

Spec Reference:
https://html.spec.whatwg.org/multipage/semantics.html#the-title-element

Test Methodology:
An iframe is created and populated with HTML containing two distinct <title> elements. The test then asserts that iframe.contentDocument.title matches the text of the first element.

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 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

GitHub PR Head
GitHub PR Base

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
You need to log in before you can comment on or make changes to this bug.