Closed Bug 1745944 Opened 3 years ago Closed 3 years ago

Use new ChromeUtils.getXPCOMErrorName() method to get platform error names

Categories

(DevTools :: Netmonitor, task)

task

Tracking

(firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Bug 1740543 added a new method to retrieve the name of errors as a string of any given XPCOM error code.
Meaning we could get rid of this outdated copy of c++ code we were using over there:
https://searchfox.org/mozilla-central/rev/71befbc9bc348d33f0c7307dc48e3cb36ba78650/devtools/server/actors/network-monitor/utils/network-utils.js#31-551

In this test, there is two that are actually dedicated to cover ResourceCommand internal cache
and the precise behavior of ignoreExistingResources: true/false.

I pulled them off in a dedicated test file and tried to simplified them a bit.

Because the server doesn't really support fetch request done before calling watchResources,
this test is a bit hard to understand. So I tried to make it clear via extensive comments.

Then, my goal is to reuse the third and simplier test to extend the coverage of NETWORK_EVENT
with many other assertions.

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f4c55b3bea7 [devtools] Clarify the two tests against ResourceCommand cache for NETWORK_EVENT's. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/10b6a5257630 [devtools] Make browser_resources_network_events.js generic enough to be used for other test pages. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/f73088ff3b94 [devtools] Use new ChromeUtils.getXPCOMErrorName() method to get platform error names. r=nchevobbe
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: