Version: 57.0.2935.0 canary (64-bit) OS: Mac OS X 10.10 Steps to reproduce: 1. Visit https://rawgit.com/mfoltzgoogle/web-platform-tests/single-presentation-url/presentation-api/controlling-ua/startNewPresentation_unsettledpromise-manual.html 2. Click Start Presentation Test Expected: Test passes Actual: Test fails: assert_throws: function "function () { throw e }" threw object "UnknownError: Internal error" that is not a DOMException OperationError: property "name" is equal to "UnknownError", expected "OperationError" Error at AssertionError.get_stack (http://web-platform.test:8000/resources/testharness.js:2458:21) at AssertionError (http://web-platform.test:8000/resources/testharness.js:2452:27) at assert (http://web-platform.test:8000/resources/testharness.js:2445:19) at assert_throws (http://web-platform.test:8000/resources/testharness.js:1280:17) at http://web-platform.test:8000/resources/testharness.js:550:13 Notes: It looks like we call through to the PresentationService and something in the implementation returns an error type that is unknown to Blink. The fix is to track something tied to the browsing context (in PresentationClient?) that there is an unresolved Promise from start().
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041 commit 42c0b54f957c23afbd3fba4058c3fcd4c5ae4041 Author: zhaobin <zhaobin@chromium.org> Date: Wed Jan 25 02:50:37 2017 [Presentation API] reject request.start() with OperationError instead of UnknownError if previous start() is in progress - add a new presentation error type: PREVIOUS_START_IN_PROGRESS - PresentationServiceImpl returns PREVIOUS_START_IN_PROGRESS error instead of UNKNOWN error if previous start is in progress - reject start() promise with OperationError if browser returns PREVIOUS_START_IN_PROGRESS error BUG= 669267 Review-Url: https://codereview.chromium.org/2647723002 Cr-Commit-Position: refs/heads/master@{#445920} [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/content/browser/presentation/presentation_service_impl.cc [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/content/browser/presentation/presentation_type_converters.cc [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/content/public/common/presentation_session.h [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/content/renderer/presentation/presentation_dispatcher.cc [add] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/third_party/WebKit/LayoutTests/presentation/presentation-start-error.html [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/third_party/WebKit/LayoutTests/presentation/presentation-start.html [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/third_party/WebKit/Source/modules/presentation/PresentationError.cpp [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/third_party/WebKit/public/platform/modules/presentation/WebPresentationError.h [modify] https://crrev.com/42c0b54f957c23afbd3fba4058c3fcd4c5ae4041/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
zhaobin@ can you verify and close this issue if fixed?
Comment 1 by zhaobin@chromium.org
, Jan 19 2017Status: Started (was: Available)