-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix a bug in test_driver.bless() #49691
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur, meaning subsequent steps could happen before the click actually took place.
chromium-wpt-export-bot
pushed a commit
that referenced
this pull request
Dec 16, 2024
This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: #49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b
aarongable
pushed a commit
to chromium/chromium
that referenced
this pull request
Dec 16, 2024
This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010}
chromium-wpt-export-bot
pushed a commit
that referenced
this pull request
Dec 16, 2024
This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: #49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010}
Closing this one in favor of #49719 |
past
pushed a commit
that referenced
this pull request
Dec 17, 2024
This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: #49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010} Co-authored-by: Mason Freed <[email protected]>
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Dec 21, 2024
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010} Co-authored-by: Mason Freed <[email protected]> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719
ErichDonGubler
pushed a commit
to erichdongubler-mozilla/firefox
that referenced
this pull request
Dec 28, 2024
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010} Co-authored-by: Mason Freed <[email protected]> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Jan 1, 2025
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <jonathanjleegoogle.com> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Commit-Queue: Jonathan Lee <jonathanjleegoogle.com> Cr-Commit-Position: refs/heads/main{#1397010} Co-authored-by: Mason Freed <masonfchromium.org> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719 UltraBlame original commit: 337b58e389432dc74cdafad2aeb85b1e0ea5fc3c
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Jan 1, 2025
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <jonathanjleegoogle.com> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Commit-Queue: Jonathan Lee <jonathanjleegoogle.com> Cr-Commit-Position: refs/heads/main{#1397010} Co-authored-by: Mason Freed <masonfchromium.org> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719 UltraBlame original commit: 337b58e389432dc74cdafad2aeb85b1e0ea5fc3c
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Jan 1, 2025
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <jonathanjleegoogle.com> Auto-Submit: Mason Freed <masonfchromium.org> Commit-Queue: Mason Freed <masonfchromium.org> Commit-Queue: Jonathan Lee <jonathanjleegoogle.com> Cr-Commit-Position: refs/heads/main{#1397010} Co-authored-by: Mason Freed <masonfchromium.org> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719 UltraBlame original commit: 337b58e389432dc74cdafad2aeb85b1e0ea5fc3c
i3roly
pushed a commit
to i3roly/firefox-dynasty
that referenced
this pull request
Jan 2, 2025
…only Automatic update from web-platform-tests Fix a bug in test_driver.bless() (#49719) This code was previously doing this: let wait_click = new Promise(resolve => { button.addEventListener("click", resolve)); }; return test_driver.click(button) .then(wait_click) .then(... but the argument to `.then(wait_click)` isn't a function, it's the promise to return. Therefore .then() creates an already-resolved promise containing `wait_click` as its resolved value. Which the next `.then()` block ignores. So this wasn't actually waiting for the click to occur. This triggered a number of test bugs (caused by erroneous assumptions accidentally baked into the tests. I fixed a few, and filed a few bugs for the rest (after failing to figure out how to fix them). Note that the WPT version of testdriver.js is rolled into Chromium, so that change is being made here: web-platform-tests/wpt#49691 Bug: 384009734,384050894 Change-Id: Ibdb8a97d23998ad89c5a48c23a7e780dc605283b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6094526 Reviewed-by: Jonathan Lee <[email protected]> Auto-Submit: Mason Freed <[email protected]> Commit-Queue: Mason Freed <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1397010} Co-authored-by: Mason Freed <[email protected]> -- wpt-commits: ce746b469d6c2fe11cf9db769eb2b3426bad6466 wpt-pr: 49719
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code was previously doing this:
but the argument to
.then(wait_click)
isn't a function, it's the promise to return. Therefore .then() ignores its argument (see step #3 at https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-performpromisethen) and proceeds immediately to the next.then()
block.Since the code wasn't actually waiting for the
click
event to finish getting fired, subsequent steps could happen out of order.