Skip to content

Commit

Permalink
add tooltips to url
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce committed Aug 17, 2017
1 parent 210c514 commit 57de9c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions lighthouse-core/audits/byte-efficiency/unused-css-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
'use strict';

const ByteEfficiencyAudit = require('./byte-efficiency-audit');
const URL = require('../../lib/url-shim');

const PREVIEW_LENGTH = 100;

Expand Down Expand Up @@ -151,8 +150,6 @@ class UnusedCSSRules extends ByteEfficiencyAudit {
const contentPreview = UnusedCSSRules.determineContentPreview(stylesheetInfo.content);
url = {type: 'code', text: contentPreview};
isInline = true;
} else {
url = URL.getURLDisplayName(url);
}

const usage = UnusedCSSRules.computeUsage(stylesheetInfo, isInline);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Best Practices: unused css rules audit', () => {
const expectedPreview = {type: 'code', text: 'dummy'};
assert.deepEqual(map({header: {sourceURL: ''}}).url, expectedPreview);
assert.deepEqual(map({header: {sourceURL: 'a'}}, 'http://g.co/a').url, expectedPreview);
assert.equal(map({header: {sourceURL: 'foobar'}}).url, '/foobar');
assert.equal(map({header: {sourceURL: 'foobar'}}).url, 'http://g.co/foobar');
});
});

Expand Down

0 comments on commit 57de9c9

Please sign in to comment.