mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-08-02 02:36:06 -04:00
Fixes 9 failing files under /dom/nodes/Document-contentType/contentType/ (bmp, css, gif, jpg, mimeheader_01, png, txt, xml, and keeps the rest green): a document created from a non-HTML response (the synthesized image/text/raw documents) reported the text/html default from document.contentType instead of the response's MIME type. The frame records the response's MIME essence (type/subtype, lowercased, parameters stripped) when the first chunk arrives, and applies it to the new document's _content_type override once the navigation commits. text/html responses keep the default. The remaining file in the directory (contenttype_javascripturi) needs iframes to navigate to javascript: URLs and document their string result, which is a different mechanism. Coverage: /dom/nodes/Document-contentType/: 14/15 files passing (9 newly passing, 1 subtest each). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>