Closed Bug 1570378 Opened 5 years ago Closed 5 years ago

Add shorthand for setting up tests without URL

Categories

(Remote Protocol :: Agent, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ato, Assigned: ato)

References

Details

Attachments

(2 files)

For browser-chrome tests we have setupTestForUri which takes a URL
and does the necessary setup to ensure tests are executed in fresh tabs.

Often this is called with an empty document:

setupTestForUri("data:text/html,")

We can avoid some boilerplate if we have a setup helper
that by default chooses an empty document.

Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1
Depends on: 1563533

Per the URL standard, we should avoid talking about URIs (and indeed
URI, URN, et al.) since the term only serves to mislead.

For many browser-chrome (bc) tests is does not matter what the
document is, as long as it is does not cause state to bleed over
from the previous test.

For these cases this patch introduces a shorthand, setup(), which
calls setupForURL(url) with an empty document generated by toDataURL("").

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/adb3dec1090b
remote: avoid URI terminology r=remote-protocol-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/412894c27fa2
remote: add bc test helper setup() for empty documents r=remote-protocol-reviewers,jdescottes

eslint errors are to do with changes from bug 1545724.
Will rebase and fix these.

Flags: needinfo?(ato)
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dfb2d2aae87e
remote: avoid URI terminology r=remote-protocol-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/ff3de1766033
remote: add bc test helper setup() for empty documents r=remote-protocol-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: