Bug 1291971 - Part 4, enable controller startNewPresentation_error test. r=smaug.
authorShih-Chiang Chien <schien@mozilla.com>
Tue, 04 Oct 2016 09:00:10 +0200
changeset 319942 54e937ecefe8839c7ca197ac6dd1663c30a4cc52
parent 319941 8d072d3047b87646813a7b52fa75baa9a9ff2d47
child 319943 5e9072e171051204bb5558290d914553c9b5c1df
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1291971
milestone52.0a1
Bug 1291971 - Part 4, enable controller startNewPresentation_error test. r=smaug. MozReview-Commit-ID: 51dfCphD0XJ
dom/presentation/PresentationService.cpp
testing/web-platform/meta/presentation-api/controlling-ua/startNewPresentation_error.html.ini
--- 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"]