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
Set harness error if async_test function returns a value #25703
Conversation
443c703
to
53ddfe9
Compare
Latest run on Chrome Dev is good - no new errors. Since the change should show up for any browser, modulo crashes (as its just looking for the return value of the function given to |
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.
Sweeeeeeeeeeet!
Co-authored-by: Philip Jägenstedt <philip@foolip.org>
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.
Have we verified that this doesn't cause any breakage?
resources/testharness.js
Outdated
var value = test_obj.step(func, test_obj, test_obj); | ||
if (value !== undefined) { | ||
var msg = "Test named \"" + test_name + | ||
"\" inappropriately returned a value"; |
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 don't think it's clear what it means for the test to return a value.
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 agree! I've reworked the wording here, please let me know if it reads better.
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.
Have we verified that this doesn't cause any breakage?
As per this comment, I've run two Chrome Dev trigger runs. The first turned up ~6 cases I had previously missed, once those were fixed the second appears to be clean.
It's possible that we have some test that is returning a value only on not-Chrome, but it seems unlikely to me? Happy to do trigger runs on other browsers if you want.
resources/testharness.js
Outdated
var value = test_obj.step(func, test_obj, test_obj); | ||
if (value !== undefined) { | ||
var msg = "Test named \"" + test_name + | ||
"\" inappropriately returned a value"; |
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 agree! I've reworked the wording here, please let me know if it reads better.
Given the change I had to make to |
Cherry-picks and modifies work done by frehner@ in
#24021
Fixes #21435
Co-authored-by: Anthony Frehner afrehner.work@gmail.com