Bug 1291971 - Part 4, enable controller startNewPresentation_error test. r=smaug.
MozReview-Commit-ID: 51dfCphD0XJ
--- a/dom/presentation/PresentationService.cpp
+++ b/dom/presentation/PresentationService.cpp
@@ -637,17 +637,17 @@ PresentationService::StartSession(
aCallback,
aBuilderConstructor);
if (aDeviceId.IsVoid()) {
// Pop up a prompt and ask user to select a device.
nsCOMPtr<nsIPresentationDevicePrompt> prompt =
do_GetService(PRESENTATION_DEVICE_PROMPT_CONTRACTID);
if (NS_WARN_IF(!prompt)) {
- return aCallback->NotifyError(NS_ERROR_DOM_OPERATION_ERR);
+ return aCallback->NotifyError(NS_ERROR_DOM_INVALID_ACCESS_ERR);
}
nsresult rv = prompt->PromptDeviceSelection(request);
if (NS_WARN_IF(NS_FAILED(rv))) {
return aCallback->NotifyError(NS_ERROR_DOM_OPERATION_ERR);
}
return NS_OK;
--- a/testing/web-platform/meta/presentation-api/controlling-ua/startNewPresentation_error.html.ini
+++ b/testing/web-platform/meta/presentation-api/controlling-ua/startNewPresentation_error.html.ini
@@ -1,3 +1,6 @@
[startNewPresentation_error.html]
type: testharness
- expected: ERROR
+ prefs: [dom.presentation.enabled: true,
+ dom.presentation.controller.enabled: true,
+ dom.presentation.discovery.enabled: true,
+ dom.presentation.device.name: "Firefox"]