Update buffered amount when async callbacks are called
If an asynchronous callback is called, it means we must have returned to the start of the event loop. Ensure that any consumed bufferedAmount is reflected in that case. Do not reflect bufferedAmount if the EventQueue is paused, as that means that we may be in a nested event loop. Add a unit test for this case. Also add a unit test for normal bufferedAmount behaviour, as there wasn't one. Add a web platform test for what happens if a sync XHR is performed between calling send() and looking at bufferedAmount. BUG=856651 Change-Id: Iafa2d619a1eb5284b64500ac03d336fb6380193b Reviewed-on: https://chromium-review.googlesource.com/1151086 Commit-Queue: Adam Rice <ricea@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#580078}
Showing
Please register or sign in to comment