Introduce a document inlining function for browser chrome tests
Categories
(Remote Protocol :: Agent, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: ato, Assigned: ato)
References
Details
Attachments
(2 files)
The tests currently do a lot of this:
const TEST_URI = "data:text/html;charset=utf-8,default-test-page";
const OTHER_URI = "data:text/html;charset=utf-8,some-other-page";
We save ourselves the boilerplate (with the potential and occasional typo)
by having a shared function that lets us generate different types of inline documents.
There is prior art for this in both the WPT and Marionette test suites:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webdriver/tests/support/inline.py#4
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Introduces helper function, inline(), that takes a document extract
and produces a data URL with the necessary properties for Gecko to
recognise it as an HTML document with the correct media type.
This has the benefit that HTML fragments and tags such as < and > are
encoded correctly, which is an obvious safety-win, and subsequently
that documents can be created on-the-fly with minimal code.
It will be possible to extend this function for other document types,
such as XHTML, XML, and even binary formats, as needed in the future.
Assignee | ||
Comment 2•5 years ago
|
||
Some local adaptions have been made, but this is mostly functionally
equivalent.
Updated•5 years ago
|
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f72466a9df1a remote: add toDataURL document inlining helper; r=remote-protocol-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/28f189acbe03 remote: update bc tests to use document inlining; r=remote-protocol-reviewers,jdescottes
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f72466a9df1a
https://hg.mozilla.org/mozilla-central/rev/28f189acbe03
Description
•