зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1820200 - [devtools] Fix and enable browser_resources_network_events.js test r=jdescottes,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172581
This commit is contained in:
Родитель
2bbf25b345
Коммит
56f88f9ab8
|
@ -55,7 +55,6 @@ skip-if =
|
|||
[browser_resources_last_private_context_exit.js]
|
||||
[browser_resources_network_event_stacktraces.js]
|
||||
[browser_resources_network_events.js]
|
||||
skip-if = true # bug 1820200
|
||||
[browser_resources_network_events_cache.js]
|
||||
[browser_resources_network_events_navigation.js]
|
||||
[browser_resources_network_events_parent_process.js]
|
||||
|
@ -69,10 +68,10 @@ skip-if = true # bug 1820200
|
|||
skip-if =
|
||||
os == "linux" && bits == 64 # Bug 1744565
|
||||
win10_2004 && !debug # Bug 1744565
|
||||
[browser_resources_stylesheets.js]
|
||||
[browser_resources_stylesheets_import.js]
|
||||
[browser_resources_stylesheets_navigation.js]
|
||||
[browser_resources_stylesheets_nested_iframes.js]
|
||||
[browser_resources_stylesheets.js]
|
||||
[browser_resources_target_destroy.js]
|
||||
[browser_resources_target_resources_race.js]
|
||||
[browser_resources_target_switching.js]
|
||||
|
|
|
@ -498,18 +498,27 @@ function getBlockedReason(channel) {
|
|||
} catch (err) {
|
||||
// "cancelledByExtension" doesn't have to be available.
|
||||
}
|
||||
|
||||
const blockList = [
|
||||
// This is emitted when a host is not found
|
||||
"NS_ERROR_UNKNOWN_HOST",
|
||||
// These are platform errors which are not exposed to the users,
|
||||
// usually the requests (with these errors) might be displayed with various
|
||||
// other status codes.
|
||||
const ignoreList = [
|
||||
// This is emited when the request is already in the cache.
|
||||
"NS_ERROR_PARSED_DATA_CACHED",
|
||||
// This is emited when there is some issues around images e.g When the img.src
|
||||
// links to a non existent url. This is typically shown as a 404 request.
|
||||
"NS_IMAGELIB_ERROR_FAILURE",
|
||||
// This is emited when there is a redirect. They are shown as 301 requests.
|
||||
"NS_BINDING_REDIRECTED",
|
||||
// E.g Emited by send beacon requests.
|
||||
"NS_ERROR_ABORT",
|
||||
];
|
||||
|
||||
// If the request is not already blocked (by a web extension) but has a failed status, check if
|
||||
// the error matches any on the block list.
|
||||
// If the request has not failed or is not blocked by a web extension, check for
|
||||
// any errors not on the ignore list. e.g When a host is not found (NS_ERROR_UNKNOWN_HOST).
|
||||
if (
|
||||
blockedReason == 0 &&
|
||||
!Components.isSuccessCode(status) &&
|
||||
blockList.includes(ChromeUtils.getXPCOMErrorName(status))
|
||||
!ignoreList.includes(ChromeUtils.getXPCOMErrorName(status))
|
||||
) {
|
||||
blockedReason = ChromeUtils.getXPCOMErrorName(status);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче