Closed Bug 1287722 Opened 8 years ago Closed 8 years ago

[Presentation WebAPI] PresentationConnectionClosedEvent is not fired on controller page when fail to load receiver page

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1287717
blocking-b2g 2.6?

People

(Reporter: twen, Unassigned)

Details

When opening a presentation with invalid URL address, there should be error message showing the connection failed.

According to the W3C spec: https://www.w3.org/TR/presentation-api/#starting-a-presentation 
  21. If any of the following steps fails, abort all remaining steps and close the presentation connection S with error as closeReason, and a human readable message describing the failure as closeMessage.

The connection should close with error message.

STR:
   1. Use the sample web page: https://people.mozilla.org/~schien/test-presentation.html
and change the presentation URL to an invalid address
   2. Use Fennec to open the web page

Expected Behavior:
Show error with error message on controller side

Actual Behavior:
Blank page on receiver side, connection terminated on controller
This is similar to bug 1287717, apparently we have two fail-to-load scenarios need to polish
  1) fail to load from presentation URL
  2) unsupported MIME type

[cross post the solution on bug 1287717 comment #2]
Two things need to be done.

1. We will need to change the state transition from "terminated" to "closed" in controller side.
https://dxr.mozilla.org/mozilla-central/source/dom/presentation/PresentationSessionInfo.cpp#769

2. We will need to close the receiver window if loading timeout is detected.
https://dxr.mozilla.org/mozilla-central/source/dom/presentation/PresentationSessionInfo.cpp#1177
Summary: [Presentation WebAPI] Invalid URL with no error msg → [Presentation WebAPI] PresentationConnectionClosedEvent is not fired on controller page when fail to load receiver page
blocking-b2g: --- → 2.6?
resolve by bug 1287717.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.