The function was returning true as long as the passed element
was an iframe and EFT was enabled.
But if the passed iframe was blocked by a CSP rule, it would
still return true, although we wouldn't actually have a dedicated
document, nor a target, for that iframe, which would lead to
issues in the inspector when trying to fetch the iframe children.
We fix this by adding a new `isFrameBlockedByCSP` util, which uses
`nsIContentPolicy#shouldLoad` with the iframe url so we can check if the iframe
is blocked by CSP, and in such case, return false.
We're also using this new function in the `NodeActor#form` method to set a `numChildren`
of `0` when the iframe is blocked (so in the inspector, the expand icon will be
hidden for the element), as well as in `WalkerActor#_getChildren` to return an
empty array when called with an iframe blocked by CSP.
A new test is added to check the iframe nodeFront properties and usage of
`WalkerFront#children` with those. We allow to set a specific pref to bypass
the guard in the children method in order to properly check that the root issue
of a given bug was fixed.
Differential Revision: https://phabricator.services.mozilla.com/D137667