Re: [presentation-api-tests] Make PresentationConnection.onclose pass (#4222)

Hi @obstschale, see `step_timeout` comment in https://github.com/w3c/web-platform-tests/issues/4040#issuecomment-261473287

About the changes in `common.js`, I do not know which configuration you are using to run the tests, but the changes you propose do not fix anything for me. As far as I can tell:

1. Changing the order of the URLs in the array does not change anything. The problem is that implementations do not support the `PresentationRequest` constructor that takes an array parameter.
2. Another problem is that Cast devices do not implement the receiving side of the Presentation API. Most tests fail as a result because the user agent cannot establish a communication channel with the receiving app.
3. Also (but that does not have any effect in practice given the fact that the receiving side is not yet implemented anywhere), there's a missing `}` in the current receiver app `support/presentation.html`, which means that the page crashes with a JS error when it loads.
4. `castClientId` is no longer needed, I think.

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 `window.presentationUrls = castUrl` but that is not what we want for the test suite longer term. It should be possible to use the Presentation API with a "regular" non-Cast-bound HTTP URL and that is the default scenario that the test suite should aim at testing. The current design and order of URLs in the array is very much on purpose.

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 `on_xxx` tests.




View on GitHub: https://github.com/w3c/web-platform-tests/pull/4222#issuecomment-261904090

Received on Monday, 21 November 2016 10:47:32 UTC