Missing tests for netmonitor filter flags

RESOLVED FIXED in Firefox 55

Status

RESOLVED FIXED
a year ago
3 months ago

People

(Reporter: stylizit, Assigned: stylizit)

Tracking

({good-first-bug})

53 Branch
Firefox 55
good-first-bug
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

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
Comment hidden (mozreview-request)
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 6

a year ago
mozreview-review
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+

Comment 7

a year ago
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

Comment 8

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cd0112703ea0
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55

Updated

3 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.