Closed Bug 1570302 Opened 5 years ago Closed 5 years ago

Conflicting mime kwarg in inline() helper function

Categories

(Testing :: geckodriver, defect, P1)

Version 3
defect

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(2 files)

The inline() helper function used in WPT wdspec tests take a
mime keyword argument, but it is effectively overridden by the
default media type for the different document types.

It should either be fixed so that you can use an alternate MIME
type for the selected document type, or it should be removed entirely.

I scanned the code base and could not find any callers that needed
to override the recommended media type, so I’m leading towards
removing the keyword argument.

Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1

The inline() function has a bug where the mime keyword argument is
ignored: if the doctype is recognised, the media type is overridden
with the default for that document type.

This patch's primary motivation is to fix that bug, so that the
media type may be configured individually from the document type.

The result of this ended in a larger refactoring of the inlining
helper so that the character set may also be individually configured.
The result of the combined changes is hopefully that the code is
easier to understand, along with its new documentation.

The HTML boilerplate now includes a <meta charset=utf-8> element,
and the Execute (Async) Script collection tests must include this
in its checks.

Pushed by ato@sny.no:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e595a5b01413
webdriver: refactor document inlining helper; r=#webdriver
https://hg.mozilla.org/integration/mozilla-inbound/rev/21696af2ddec
webdriver: make collection tests count <meta>; r=whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/18292 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: