Closed Bug 1405081 Opened 8 years ago Closed 7 years ago

[geckoview] Add high-level fetch API

Categories

(GeckoView :: General, enhancement, P2)

enhancement

Tracking

(geckoview64 wontfix, firefox64 wontfix, firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
geckoview64 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: snorp, Assigned: snorp)

References

Details

Attachments

(6 files, 1 obsolete file)

There are some cases where we would like to fetch a resource through Gecko from Java. AFAIK we have never had a great way to do this in Fennec, but such an interface makes sense alongside GeckoView. We probably want this in order to re-fetch web app manifest or launcher icons, for instance.
Priority: P1 → P2
Assignee: nobody → snorp
Nick, attached is a rough first pass at this. The patch has a lot of problems, but does work for the small smoke test. The interesting parts are WebRequest, WebResponse, WebExecutor, and GeckoWebExecutor. NI just to make sure it doesn't get lost in your bugmail.
Flags: needinfo?(nalexander)
This allows us to easily share a GeckoRuntime with other tests that don't use GeckoSessionTestRule.
This provides a Fetch-like API for GeckoView apps. Depends on D7798
Attachment #9013419 - Attachment is obsolete: true
This was derived from work done by Andrew Gaul <andrew@gaul.org> for the Chaos HTTP proxy.
Pushed by jwillcox@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/017c51559d4a Move GeckoRuntime creation out of GeckoSesionTestRule r=jchen https://hg.mozilla.org/integration/mozilla-inbound/rev/5fda5eb5fd01 Add WebRequestError and use it in NavigationDelegate.onLoadError r=esawin,jchen https://hg.mozilla.org/integration/mozilla-inbound/rev/778ef7a62d5d Move GeckoSessionTestRule.waitForResult() into UiThreadUtils r=jchen https://hg.mozilla.org/integration/mozilla-inbound/rev/e24c0262f83e Move default timeout logic into Environment utility class r=jchen https://hg.mozilla.org/integration/mozilla-inbound/rev/a768da5d9f82 Add partial HttpBin implementation for local HTTP tests r=esawin https://hg.mozilla.org/integration/mozilla-inbound/rev/91f7f603954c Add WebRequest, WebResponse, and GeckoWebExecutor to GeckoView r=jchen,esawin
Depends on: 1504066
64=wontfix because we don't need to uplift this fix for Focus 8.0's GV 64 beta test
status-geckoview64=wontfix
I'm embarrassed to say that I didn't provide feedback on this in a timely manner. Sorry, all.
Flags: needinfo?(nalexander)
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 65 → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: