Closed Bug 1573456 Opened 5 years ago Closed 5 years ago

Add unit test to check that moz-extension: redirect by webRequest is loaded in the correct process

Categories

(WebExtensions :: Request Handling, task, P2)

task

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: robwu, Assigned: willdurand, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached file webRequest-redirect-to-extension.zip (deleted) —

STR:

  1. Load the attached extension.
  2. Navigate to https://example.com/redir (or click on the extension button).
  3. (the extension will use the webRequest API to redirect the request to a web-accessible moz-extension page).
  4. Look at the page.

Expected:

  • "events,types,browserAction,tabs,windows,extensionTypes,contentScripts,management,permissions,theme,experiments,webRequest,extension,i18n,runtime,test"
    (this shows that the page is loaded in the extension process)

Actual:

  • "extension,i18n,runtime,test"
    (the page is loaded in a web content process, gBrowser.selectedBrowser.remoteType is "web" instead of "extension"; checking the process ID in the content toolbox also shows that the page itself is loaded in the wrong process)

This is not a recent regression. It happens on Nightly 70, release 68.0.1, Firefox 60 (tested on Linux).

When the tab is reloaded or duplicated, the page is loaded in the expected process.

Whiteboard: webext?

We're hoping this will get fixed via fission changes (assuming it's not already fixed).

With fission.autostart=true, this bug goes away.

Priority: -- → P3
Whiteboard: webext?
Blocks: 1561711

This issue has been fixed since Firefox 72 by bug 1584031 (https://hg.mozilla.org/mozilla-central/rev/7a1d40167829), but regresseed briefly in 73 (https://bugzilla.mozilla.org/show_bug.cgi?id=1561711#c8), so we should add a unit test.

Assignee: nobody → rob
Status: NEW → ASSIGNED
Type: defect → task
Priority: P3 → P2
Summary: moz-extension: redirect by webRequest is loaded in the wrong process → Add unit test to check that moz-extension: redirect by webRequest is loaded in the correct process
Depends on: 1584031

Thanks for taking over Will!

Assignee: rob → wdurand
Mentor: rob
Pushed by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a6011666e5f Add browser test to check that moz-extension: redirect by webRequest is loaded in the correct process. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Attachment #9136404 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: