Closed Bug 1241155 Opened 4 years ago Closed 4 years ago

bug in browser_rules_user-agent-styles.js

Categories

(DevTools :: Inspector: Rules, defect)

defect
Not set

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: tromey, Assigned: tromey)

Details

Attachments

(1 file, 1 obsolete file)

Brian noticed a bug in browser_rules_user-agent-styles.js:

  ok(uaRules.some(rule=> rule.matchedSelectors.indexOf("*|*:link")),
    "There is a rule for *|*:link");

indexOf returns -1 if not found, so this isn't working as intended.
Also, this should be only checked for the link and not all elements in TEST_DATA.. Happens to pass with all elements because of the bug.
Attachment #8710013 - Flags: review?(bgrinstead)
Attachment #8710013 - Attachment is obsolete: true
Attachment #8710013 - Flags: review?(bgrinstead)
Comment on attachment 8710017 [details] [diff] [review]
correctly use indexOf in browser_rules_user-agent-styles.js

Add an explanatory comment.
Attachment #8710017 - Flags: review?(bgrinstead)
Attachment #8710017 - Flags: review?(bgrinstead) → review+
https://hg.mozilla.org/mozilla-central/rev/d9fd8e16ff56
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Not clear.
Developer specific testing

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel          beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS			Windows 7 SP1 x86_64

Expected Results: 
Developer specific testing

Actual Results: 
As expected
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.