[PresentationAPI] on start(), connectionavailable is fired before Promise is resolved |
|||
Issue descriptionVersion: 57.0.2935.0 canary (64-bit) OS: Mac OS X 10.10 What steps will reproduce the problem? (1) Go to https://rawgit.com/mfoltzgoogle/web-platform-tests/single-presentation-url/presentation-api/controlling-ua/startNewPresentation_success-manual.html (2) Click Start Presentation Test (3) Select a Cast device What is the expected result? Test passes Actual: Test fails. assert_equals: Event order is incorrect. expected "Phase #1: Promise is resolved" but got "Phase #2: 'connectionavailable' event fired" at checkPhase (http://web-platform.test:8000/presentation-api/controlling-ua/startNewPresentation_success-manual.html:46:55) Failing code in https://github.com/mfoltzgoogle/web-platform-tests/blob/single-presentation-url/presentation-api/controlling-ua/startNewPresentation_success-manual.html
,
Dec 1 2016
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4e188d7c91feaff452f8cf8c93ac48a4393b8e5b commit 4e188d7c91feaff452f8cf8c93ac48a4393b8e5b Author: zhaobin <zhaobin@chromium.org> Date: Fri Dec 09 18:49:00 2016 [Presentation API] fire onconnectionavailable and onconnect event asynchronously We would like to ensure following execution order when calling PresentationRequest.start(): 1. resolve start() promise 2. fire PresentationRequest onconnectionavailable event 3. fire PresentationConnection onconnect event To fire event after resolving promise, we need to dispatch events asynchronously BUG= 669213 Review-Url: https://codereview.chromium.org/2547143002 Cr-Commit-Position: refs/heads/master@{#437598} [modify] https://crrev.com/4e188d7c91feaff452f8cf8c93ac48a4393b8e5b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp [modify] https://crrev.com/4e188d7c91feaff452f8cf8c93ac48a4393b8e5b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
,
Dec 9 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mfo...@chromium.org
, Nov 28 2016