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
Make PresentationConnection.onclose pass #4222
Make PresentationConnection.onclose pass #4222
Conversation
To make this test pass a `promise_test` is used.
Reviewers for this pull request are: @louaybassbouss, @tidoust, and @zqzhang. |
Hi @obstschale, see About the changes in
Points 1. and 2. should hopefully be temporary: support should improve over time. Point 1 can of course be solved in the meantime with code such as For point 2, if there are no plans to support the receiving side of the Presentation API on Cast devices for the foreseeable future, we may need to create a specific Cast receiver app (that uses the Cast SDK) in the end. This would allow to run additional tests on the controlling side. Both points mean that most tests currently fail in practice, but I don't think that is a bug with the test suite. This makes it hard to author tests for sure. I'll give it a try with a true Cast receiving app to see if we can ease our lives while implementations catch up. I would suggest to address this separately from the updates on the |
That is all still very confusing to me 🤔 Why did I change
|
Could you clarify what test configuration you're using? I have a Chromecast (running Google Cast v1.21.74816) for the receiving side. Google Chrome for Android (v54.0.2840.85) seems happy with the array constructor, picks up the Cast URL, regardless of its position in the array and shows my Chromecast in the list of devices available. Google Chrome for desktop (v54.0.2840.99m) and Chrome Canary (v57.0.2931.0) on Windows do not seem to support the array constructor at all. I get an empty list of devices (provided I force the source to be the controlling page as Chrome proposes to mirror the tab as a fallback) and a In short, I get mixed results depending on what I use, but the order of URLs in the array and Regardless of these results, we want to create a test suite that can run across implementations of the Presentation API. Such tests should not contain proprietary code. Cast URLs are proprietary: the Presentation API does not define how a user agent is to handle a Cast URL and map it onto the address of the page to present. In theory, the test suite should not contain any reference to a Cast URL. It does in practice because that's the only available receiver right now, plus it allows to test the 2-UA mode. In an ideal world, we'd be able to get rid of Cast URLs soon. Another problem we have to face today is the lack of implementations of the receiving side.
Well, you cannot! This is what makes writing tests so hard. The only things you can do are:
Of course, you can change
By "true Cast app", I mean one that follows the initialization steps in the Custom Receiver Application Google Cast doc. |
I had to close this PR because I merged some stuff from #4256 and that would make this PR really messy I guess. |
This is a PR for #4040
To make this test pass a
promise_test
is used.I also changed 2 things in
presentation-api/controlling-ua/common.js
.castUrl
. ThecastClientId
was missing. That caused aErrorNotFound
rejection.