Closed Bug 1363914 Opened 8 years ago Closed 8 years ago

Missing tests for netmonitor filter flags

Categories

(DevTools :: Netmonitor, defect)

53 Branch
defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: stylizit, Assigned: stylizit)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Steps to reproduce: We currently have a suite of tests in devtools/client/netmonitor/test/browser_net_filter-flags.js for : "running", "is", "status-code", "mime-type", "method", "scheme", "regexp" filter flags. We miss tests for "protocol", "domain", "remote-ip", "has-response-header", "cause", "transferred", "larger-than", "size", "set-cookie-domain", "set-cookie-name", "set-cookie-value" filter flags. Actual results: Some filter flags don't have tests Expected results: All filters flags should have tests
Also, in devtools/client/netmonitor/test/browser_net_filter-flags.js, I think the "isSizeMatch" function seems slightly wrong as isSizeMatch(0, 0) returns false. http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/utils/filter-text-utils.js#215 As other filters depend on this, it probably needs to be addressed before we can add more tests.
Component: Untriaged → Developer Tools: Netmonitor
Status: UNCONFIRMED → NEW
Ever confirmed: true
The cookie tests are being added in bug 1360473
Keywords: good-first-bug
Thanks, could you also please assign this to me if you're comfortable with it?
Assignee: nobody → matthieu.rigolot
I added the tests missing for the remaining filter flags: - Fixed isSizeMatch - Added a new request using gzip so we can differentiate between "larger-than" and "transferred-larger-than"
Comment on attachment 8871709 [details] Bug 1363914 - Added tests for filter flags: protocol, domain, remote-ip, has-response-headers, cause, transferred, larger-than and size; https://reviewboard.mozilla.org/r/142978/#review148270 Looks reasonable. R+ assuming Try is green Thanks for the patch! Honza
Attachment #8871709 - Flags: review?(odvarko) → review+
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cd0112703ea0 Added tests for filter flags: protocol, domain, remote-ip, has-response-headers, cause, transferred, larger-than and size; r=Honza
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: