-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1944349 [wpt PR 50338] - DOM: Add more Observable iterable tests,…
… a=testonly Automatic update from web-platform-tests DOM: Add more Observable iterable tests This CL adds and supplements a few tests: 1. First we modify the existing "subscribe with aborted signal" tests. Specifically, we expand their assertions to not only assert that `next()` isn't ever called, but make more assertions about the iterator protocol getter and function invocations in general. 2. Second, we modify the test that asserts `next()` is not called when you subscribe with an unaborted signal, but that signal gets aborted while the iterator protocol methods are called during subscription of the Observable. We expand the assertions in the same way as (1), and combine the two separate tests into one that covers both sync and async iterators, also to match (1). 3. Finally, this CL adds a sync iterable version of the test added in https://crrev.com/c/6199630. The test scenario is: you subscribe to a sync iterable with an unaborted signal that gets aborted while obtaining the iterator (just like (2)), BUT while getting the iterator, an error is thrown. The tests asserts that the error is reported to the global before we consult the aborted signal and stop the subscription process. This ensures that the exception is not swallowed, but is appropriately surfaced, even though the subscription is aborted. This corresponds with the spec PR: WICG/observable#192. R=masonf Bug: 363015168 Change-Id: Ida605c49a2d73cd407a9dc3c392d6b2f338855be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6202182 Commit-Queue: Dominic Farolino <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1412315} -- wpt-commits: ea15691f277a5e965d90f9c0167638559ff62f0d wpt-pr: 50338
- Loading branch information
1 parent
768cac5
commit 3a6ceb8
Showing
1 changed file
with
128 additions
and
58 deletions.
There are no files selected for viewing
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