Closed
Bug 1288600
Opened 8 years ago
Closed 8 years ago
[Presentation WebAPI] No available device, return NotFoundError exception
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: twen, Assigned: schien)
References
Details
(Whiteboard: [ETA 8/19])
Attachments
(1 file, 1 obsolete file)
13.41 KB,
patch
|
schien
:
review+
|
Details | Diff | Splinter Review |
According to https://www.w3.org/TR/presentation-api/#starting-a-presentation
10. If either of the following is true:
1. The list of available presentation displays is empty and will remain so before the request for user permission is completed.
...
Then run the following steps:
1. Reject P with a NotFoundError exception.
2. Abort all remaining steps.
If there is no device available for presentation display, WebAPI should return NotFoundError.
Reporter | ||
Updated•8 years ago
|
blocking-b2g: --- → 2.6?
Assignee | ||
Comment 1•8 years ago
|
||
@Teri can you upload or link your test case to this bug?
Flags: needinfo?(twen)
Reporter | ||
Comment 2•8 years ago
|
||
STR:
1. Make sure no device is in the environment
2. Try to launch a presentation
Expected Behavior:
Return NotFoundError and abort
Actual Behavior:
>>start error: AbortError: The operation was aborted.
Flags: needinfo?(twen)
Assignee | ||
Comment 3•8 years ago
|
||
Ok, this line of code should be responsible: https://dxr.mozilla.org/mozilla-central/source/dom/presentation/PresentationService.cpp#178
This part of spec is changed after our first implementation.
In order to fulfill the step #10 and #11 of the start session procedure, we'll need PresentationDevicePrompt to provide error cause while canceling the prompt request.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → schien
Assignee | ||
Comment 4•8 years ago
|
||
1. reject promise with NotFoundError while no available device
2. reject promise with NotAllowedError while canceled by user
3. expose NS_ERROR_DOM_NOT_FOUND_ERR and NS_ERROR_DOM_NOT_ALLOWED_ERR in Components.results.
Attachment #8778780 -
Flags: review?(bugs)
Comment on attachment 8778780 [details] [diff] [review]
not-found-error-while-no-device.patch
>+
>+/* Codes related to Presentation API */
>+XPC_MSG_DEF(NS_ERROR_DOM_NOT_FOUND_ERR , "The object can not be found here.")
>+XPC_MSG_DEF(NS_ERROR_DOM_NOT_ALLOWED_ERR , "The request is not allowed.")
Not really related to presentation API only, since they are defined in Webidl.
So you can drop the comment, or mention webidl
Attachment #8778780 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 6•8 years ago
|
||
Assignee | ||
Comment 7•8 years ago
|
||
update according to review comment, carry r+.
Attachment #8778780 -
Attachment is obsolete: true
Attachment #8779163 -
Flags: review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f30384ba6bc3
reject promise with NotFoundError while no device, and NotAllowedError while canceled by user. r=smaug.
Keywords: checkin-needed
Comment 9•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Reporter | ||
Comment 10•8 years ago
|
||
Hi SC,
Found that fennec shuts down when the request is canceled by user.
Can you take a look?
Flags: needinfo?(schien)
Assignee | ||
Comment 11•8 years ago
|
||
(In reply to Teri Wen [:twen] from comment #10)
> Hi SC,
>
> Found that fennec shuts down when the request is canceled by user.
> Can you take a look?
This fix is also included in the final version of patch that landed on m-c, do you want an update version of ENG build for verification?
Flags: needinfo?(schien) → needinfo?(twen)
Reporter | ||
Comment 13•8 years ago
|
||
Verified fixed.
No device.
>>start error: NotFoundError: Node was not found
User cancel request.
>>start error: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•