-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: fix typo in performance-budget smoke test #9244
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
// Load file as 'other' resource. | ||
const response = await fetch('http://localhost:10503/preload.html'); | ||
const ab = await response.arrayBuffer(); | ||
document.querySelector('#corsfont').textContent = ab.length; | ||
document.querySelector('.corsfont').textContent = ab.byteLength; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ha, good catch. Clearly QA was lying down on the job for this page :) |
||
} | ||
yah(); | ||
</script> | ||
|
@@ -40,7 +40,7 @@ | |
<img style="width: 100px; height: 100px;" src="../../byte-efficiency/large.svg"> | ||
<p class="webfont">Ripping off some webfont smoke tests</p> | ||
<p><strong class="webfont">Do we need such text</strong></p> | ||
<p id="corsfont"></p> | ||
<p class="corsfont"></p> | ||
<script src="../level-2.js"></script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,11 +72,11 @@ module.exports = [ | |
audits: { | ||
'resource-summary': { | ||
score: null, | ||
displayValue: '11 requests • 164 KB', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for anyone else scratching their head how in the world this was affected by the fixture change when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my fault, it was sloppy to change it only a little and then draw a line in the sand for the budgets at that point :) No memory of why I didn't change the classname itself from what's in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I'm still not clear why we need to use it at all no harm no foul I was just baffled how his text change could result in fonts getting requested 😆 I think I was just slow on the uptake that this was modeled after another file |
||
displayValue: '12 requests • 211 KB', | ||
details: { | ||
items: [ | ||
{resourceType: 'total', requestCount: 11, size: '168000±1000'}, | ||
{resourceType: 'font', requestCount: 2, size: '80000±1000'}, | ||
{resourceType: 'total', requestCount: 12, size: '215000±1000'}, | ||
{resourceType: 'font', requestCount: 3, size: '128000±1000'}, | ||
{resourceType: 'script', requestCount: 3, size: '55000±1000'}, | ||
{resourceType: 'image', requestCount: 2, size: '28000±1000'}, | ||
{resourceType: 'document', requestCount: 1, size: '2100±100'}, | ||
|
@@ -94,19 +94,19 @@ module.exports = [ | |
items: [ | ||
{ | ||
resourceType: 'total', | ||
countOverBudget: '3 requests', | ||
sizeOverBudget: '65000±1000', | ||
countOverBudget: '4 requests', | ||
sizeOverBudget: '113000±1000', | ||
}, | ||
{ | ||
resourceType: 'font', | ||
countOverBudget: '1 request', | ||
sizeOverBudget: '52000±1000', | ||
}, | ||
{ | ||
resourceType: 'script', | ||
countOverBudget: '2 requests', | ||
sizeOverBudget: '25000±1000', | ||
}, | ||
{ | ||
resourceType: 'font', | ||
countOverBudget: undefined, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the intention was to make sure we got a good mixture of the combinations of defined and undefined for these entries, so ideally this wouldn't change from Maybe the "Undefined items" comment above could be changed to be a little more strongly worded to warn about that and we could change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yea, sounds good i'll do that and revert all these expectation changes |
||
sizeOverBudget: '4000±500', | ||
}, | ||
{ | ||
resourceType: 'document', | ||
countOverBudget: '1 request', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is just about text and doesn't matter at all right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk, would the font be loaded if there were no text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, oh I see what I'm missing now sorry :)
new ArrayBuffer().length === undefined
, not just a semantic difference like in nodeel.textContent = undefined
clears all textContent, and does not do some sort of string coercion to"undefined"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be clear, while the actual behavior is unintended and pointless, the intended behavior was also pointless. There's no reason to add this to the page at all, just making sure (poorly, it turns out) the thing is actually loaded and used :)