New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 669267 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

[PresentationAPI] Second PresentationRequest.start() call does not reject with OperationError

Project Member Reported by mfo...@chromium.org, Nov 28 2016

Issue description

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().




 
Owner: zhaobin@chromium.org
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 25 2017

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

Comment 3 by mfo...@chromium.org, Jan 30 2017

zhaobin@ can you verify and close this issue if fixed?
Status: Fixed (was: Started)

Sign in to add a comment