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
Rewrite tests to reduce running time #16838
Conversation
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.
Thanks for making the tests faster!! :)
preload/resources/preload_helper.js
Outdated
@@ -16,6 +16,11 @@ function verifyNumberOfResourceTimingEntries(url, number) | |||
assert_equals(numEntries, number, url); |
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.
Nit: You could use the helper function here
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.
Will do.
preload/link-header-preload.html
Outdated
} | ||
iterations++; | ||
if (iterations == 10) { | ||
verifyNumberOfResourceTimingEntries("resources/square.png?link-header-preload", 1); |
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.
Why do you need to verify here if you already checked for the values earlier? I don't think these asserts will ever pass. Or are you expecting them to fail? If so, maybe make that failure more explicit? (e.g. assert_unreached)
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.
I wanted to make this test behave similarly to the current version and give feedback which asserts are failing. If you think it is ok to instead have a generic unreached message, I am fine with that as well?
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.
That's fair. Maybe then add a comment that you expect them to fail? Also, I forget but do we need a done()
in case of failed expectations?
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.
LGTM % discussed nits
No description provided.