-
Notifications
You must be signed in to change notification settings - Fork 9.7k
core(errors-in-console): ignore BLOCKED_BY_CLIENT.Inspector errors #11901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ee79c62
f8e4294
2ad2cd2
c9662ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,22 @@ describe('ConsoleMessages error logs audit', () => { | |
| 'TypeError: Cannot read property \'msie\' of undefined'); | ||
| }); | ||
|
|
||
| // Checks bug #10198 | ||
|
paulirish marked this conversation as resolved.
Outdated
|
||
| it('filters out blocked_by_client.inspector messages', () => { | ||
| const auditResult = ErrorLogsAudit.audit({ | ||
| ConsoleMessages: [{ | ||
| 'source': 'exception', | ||
| 'level': 'error', | ||
| 'timestamp': 1506535813608.003, | ||
| 'url': 'https://www.facebook.com/tr/', | ||
| 'text': 'Failed to load resource: net::ERR_BLOCKED_BY_CLIENT.Inspector', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO this test case is unnecessary, given the next few tests are exercising the filter feature. At minimum, i'd like to see it moved to after the filter tests (As it builds on them)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to see the test remain as it describes a new, important part of this audit's default state of being. No real preference for position on my end :)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not new, it's a parametrization of what multiple previous test cases has already proved to work (that the At the least, please move the test to after the ones that assert filtering works.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't realize that's what you were suggesting. It sounded to me like you wanted the assertion of this being the default removed, which I didn't :)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't originally, your feedback evolved my stance :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why we're going to town on this fairly innocuous test, but I'll join in too :) The test seems good as is to me. We don't care about how exactly the default pattern comes in, just that If e.g. we decide we want to merge Agreed that it makes sense to move into the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }], | ||
| }, {options: ErrorLogsAudit.defaultOptions()}); | ||
| assert.equal(auditResult.score, 1); | ||
| assert.equal(auditResult.details.items.length, 0); | ||
| }); | ||
|
|
||
|
|
||
| describe('options', () => { | ||
| it('does nothing with an empty pattern', () => { | ||
| const options = {ignoredPatterns: ''}; | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial reaction was
.Inspectormight be too narrow since I didn't remember it always having that suffix, but I couldn't find reports of it without it, so I might be making that up. Calling it out in case you had the same initial thought and were on the fence for another nudge :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bunch of other blockedReasons that are fairly legit, so i think preserving those results seems good. https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-BlockedReason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya for sure, but those would be caught by
{ignoredPatterns: ['ERR_BLOCKED_BY_CLIENT']}? I was questioning if the.Inspectorpart needs to be here.