function expectRuleRanges(spec, cssCode, selector, ranges, mode) {
                var result = CSSUtils._findAllMatchingSelectorsInText(cssCode, selector, mode);
                spec.expect(result.length).toEqual(ranges.length);
                ranges.forEach(function (range, i) {
                    spec.expect(result[i].ruleStartLine).toEqual(range.start);
                    spec.expect(result[i].declListEndLine).toEqual(range.end);
                });
            }
Checks the lines ranges of the results returned by CSSUtils. Expects the numbers of
results to equal the length of 'ranges'; each entry in range gives the {start, end}
of the expected line range for that Nth result.