chromium / suspicious-site-reporter

Extension for reporting suspicious sites to Safe Browsing.
Apache License 2.0
95 stars 22 forks source link

Set flag color to gray when not-top-site is the only signal #14

Closed livvielin closed 5 years ago

estark37 commented 5 years ago

Oh, is this something that can be tested?

livvielin commented 5 years ago

Oh, is this something that can be tested?

Yes, it should be testable, but I think a bit tricky to get right. I imagine it'd have to be something along the lines of creating a spy for chrome.browserAction.setIcon/BadgeText and checking that it's called with the expected arguments--but IIRC doing this while some of the functions are nested in the background script didn't work out quite as expected. I think this might be best revisited after issue #16 is resolved.

estark37 commented 5 years ago

Oh, is this something that can be tested?

Yes, it should be testable, but I think a bit tricky to get right. I imagine it'd have to be something along the lines of creating a spy for chrome.browserAction.setIcon/BadgeText and checking that it's called with the expected arguments--but IIRC doing this while some of the functions are nested in the background script didn't work out quite as expected. I think this might be best revisited after issue #16 is resolved.

Makes sense. Thanks!