Closed
Bug 1446517
Opened 6 years ago
Closed 6 years ago
move some webrequest auth tests to xpcshell
Categories
(WebExtensions :: Request Handling, enhancement)
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: mixedpuppy, Assigned: mixedpuppy)
Details
Attachments
(1 file)
No description provided.
Comment 1•6 years ago
|
||
Please yes...
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8959679 [details] Bug 1446517 - move some webRequest auth tests to xpcshell, https://reviewboard.mozilla.org/r/228508/#review234356 Thank you! ::: toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js:14 (Diff revision 1) > - xhr.open("GET", url); > - xhr.onload = resolve; > - xhr.onabort = reject; > - xhr.onerror = reject; > - xhr.send(); > - }); > +const server = createHttpServer({hosts: HOSTS}); > + > +const BASE_URL = "http://example.com"; > + > +// Save seen realms for cache checking. > +let realms = []; Nit: This should probably be a `Set` ::: toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js:46 (Diff revision 1) > -} > + } > > -function getAuthHandler(result, blocking = true) { > - function background(result) { > + response.setHeader("Content-Type", "text/plain; charset=UTF-8", false); > + if (proxy_realm && !request.hasHeader("Proxy-Authorization")) { > + // We're not testing anything that requires checking the proxy auth user/password. > + response.setStatusLine("1.0", 407, "Proxy authentication required"); Nit: Template string, please. ::: toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js:127 (Diff revision 1) > + extension.awaitMessage("onBeforeRequest"), > + extension.awaitMessage("onCompleted"), > + ]); > + }), > + ]); > + // let body = await testXHR(requestUrl); Remove? ::: toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js:135 (Diff revision 1) > + events = Promise.all([ > + extension.awaitMessage("onBeforeRequest"), > + extension.awaitMessage("onCompleted"), > + ]); No need for this dance. Just do both awaitMessages after you load the content page. Same above, really... and below.
Attachment #8959679 -
Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request) |
Pushed by mixedpuppy@gmail.com: https://hg.mozilla.org/integration/autoland/rev/982d2108e78d move some webRequest auth tests to xpcshell, r=kmag
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/982d2108e78d
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•