Bug 1819307 - Enable devtools/client/netmonitor/test/browser_net_worker_stacks.js test. r=jdescottes

After PFetch is enabled, fetch() in workers will go through the PFetch IPC to the parent process directly.
It means fetch() in the workers would not create any channels in content process and would not be blocked by the content process main thread anymore.

But since there is no channel in content process anymore, the netmonitor would also not get any notifications which expected from the channel.

Therefore, we remove checking for fetch() in the test, and enable the test.

https://searchfox.org/mozilla-central/rev/f7edb0b474a1a922f3285107620e802c6e19914d/devtools/client/netmonitor/test/browser_net_worker_stacks.js#74-81

We are planing to make worker's execution to be off-main thread, which means script loading, xhr and other network access will suppose to create channels in the parent process directly.
Therefore, we might need a new way to propagate these information for devtools.
There are two possible solutions
1. Faking a channel in the content process, such that netmonitor can still listen the notification.
2. Netmonitor listens on the parent process, and propagate the needed information to the content process devtool.

However, no matter which solution is applied, they both have some problem need to be figure out and fix.

Differential Revision: https://phabricator.services.mozilla.com/D171449
This commit is contained in:
Eden Chuang 2023-03-02 17:45:59 +00:00
Родитель dff80ae68e
Коммит 1dfb294968
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -306,7 +306,6 @@ skip-if =
[browser_net_worker_stacks.js]
skip-if =
win10_2004 # Bug 1723573
nightly_build # Bug 1351231
[browser_net_ws-basic.js]
[browser_net_ws-clear.js]
[browser_net_ws-connection-closed.js]

Просмотреть файл

@ -70,6 +70,10 @@ const EXPECTED_REQUESTS = [
{ file: WORKER_URL, line: 18 },
],
},
// After enabling PFetch, we lose the link between the channel of the parent
// process and the tab.
// https://bugzilla.mozilla.org/show_bug.cgi?id=1819570
/*
{
method: "GET",
url: HTTPS_EXAMPLE_URL + "missing.txt",
@ -80,6 +84,7 @@ const EXPECTED_REQUESTS = [
{ file: WORKER_URL, line: 26 },
],
},
*/
];
add_task(async function() {