Bug 1333084 - Add WebAuthn to test_interfaces r=bz a=lizzard
authorJ.C. Jones <jjones@mozilla.com>
Mon, 23 Jan 2017 09:20:56 -0700
changeset 375788 4d570c752fc9249899dac5a9ae98cc35e4061084
parent 375787 fcb2593e3808492dcf2e0dc3519ef31796ae128d
child 375789 f80dc144cdd03a4999b4c527d13538316eb19fdc
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, lizzard
bugs1333084, 1309284
milestone53.0a2
Bug 1333084 - Add WebAuthn to test_interfaces r=bz a=lizzard Should have happened in Bug 1309284 but was missed since test_interfaces' scheme wasn't https. Update: Disable all WebAuthn webidl interfaces. MozReview-Commit-ID: CSeGLoIGKvf
dom/tests/mochitest/general/mochitest.ini
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/WebAuthentication.webidl
--- a/dom/tests/mochitest/general/mochitest.ini
+++ b/dom/tests/mochitest/general/mochitest.ini
@@ -88,16 +88,17 @@ subsuite = clipboard
 [test_focus_legend_noparent.html]
 [test_focusrings.xul]
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_for_of.html]
 [test_framedhistoryframes.html]
 [test_frameElementWrapping.html]
 [test_img_mutations.html]
 [test_interfaces.html]
+scheme = https
 [test_navigation_timing.html]
 [test_network_events.html]
 skip-if = true
 # Disable this test until bug 795711 is fixed.
 [test_offsets.html]
 support-files = test_offsets.js
 [test_outerHTML.html]
 [test_outerHTML.xhtml]
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -863,16 +863,20 @@ var interfaceNamesInGlobalScope =
     "ServiceWorker",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerContainer",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerMessageEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ServiceWorkerRegistration",
 // IMPORTANT: Do not change this list without review from a DOM peer!
+    {name: "ScopedCredential", disabled: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
+    {name: "ScopedCredentialInfo", disabled: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
     "ShadowRoot", // Bogus, but the test harness forces it on.  See bug 1159768.
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SharedWorker",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SimpleGestureEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "SimpleTest", xbl: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
@@ -1217,16 +1221,22 @@ var interfaceNamesInGlobalScope =
     {name: "VRStageParameters", release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "VTTCue",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "VTTRegion", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WaveShaperNode",
 // IMPORTANT: Do not change this list without review from a DOM peer!
+    {name: "WebAuthnAssertion", disabled: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
+    {name: "WebAuthnAttestation", disabled: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
+    {name: "WebAuthentication", disabled: true},
+// IMPORTANT: Do not change this list without review from a DOM peer!
     "WebGLActiveInfo",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WebGLBuffer",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WebGLContextEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WebGLFramebuffer",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/WebAuthentication.webidl
+++ b/dom/webidl/WebAuthentication.webidl
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * https://www.w3.org/TR/webauthn/
  */
 
 /***** Interfaces to Data *****/
 
-[SecureContext]
+[SecureContext, Pref="security.webauth.webauthn"]
 interface ScopedCredentialInfo {
     readonly attribute ScopedCredential    credential;
     readonly attribute WebAuthnAttestation attestation;
 };
 
 dictionary Account {
     required DOMString rpDisplayName;
     required DOMString displayName;
@@ -32,17 +32,17 @@ dictionary ScopedCredentialParameters {
 
 dictionary ScopedCredentialOptions {
     unsigned long                        timeoutSeconds;
     USVString                            rpId;
     sequence<ScopedCredentialDescriptor> excludeList;
     WebAuthnExtensions                   extensions;
 };
 
-[SecureContext]
+[SecureContext, Pref="security.webauth.webauthn"]
 interface WebAuthnAssertion {
     readonly attribute ScopedCredential credential;
     readonly attribute ArrayBuffer      clientData;
     readonly attribute ArrayBuffer      authenticatorData;
     readonly attribute ArrayBuffer      signature;
 };
 
 dictionary AssertionOptions {
@@ -50,17 +50,17 @@ dictionary AssertionOptions {
     USVString                            rpId;
     sequence<ScopedCredentialDescriptor> allowList;
     WebAuthnExtensions                   extensions;
 };
 
 dictionary WebAuthnExtensions {
 };
 
-[SecureContext]
+[SecureContext, Pref="security.webauth.webauthn"]
 interface WebAuthnAttestation {
     readonly    attribute USVString     format;
     readonly    attribute ArrayBuffer   clientData;
     readonly    attribute ArrayBuffer   authenticatorData;
     readonly    attribute any           attestation;
 };
 
 // Renamed from "ClientData" to avoid a collision with U2F
@@ -71,17 +71,17 @@ dictionary WebAuthnClientData {
     DOMString                    tokenBinding;
     WebAuthnExtensions           extensions;
 };
 
 enum ScopedCredentialType {
     "ScopedCred"
 };
 
-[SecureContext]
+[SecureContext, Pref="security.webauth.webauthn"]
 interface ScopedCredential {
     readonly attribute ScopedCredentialType type;
     readonly attribute ArrayBuffer          id;
 };
 
 dictionary ScopedCredentialDescriptor {
     required ScopedCredentialType type;
     required BufferSource         id;
@@ -92,17 +92,17 @@ dictionary ScopedCredentialDescriptor {
 enum WebAuthnTransport {
     "usb",
     "nfc",
     "ble"
 };
 
 /***** The Main API *****/
 
-[SecureContext]
+[SecureContext, Pref="security.webauth.webauthn"]
 interface WebAuthentication {
     Promise<ScopedCredentialInfo> makeCredential (
         Account                                 accountInformation,
         sequence<ScopedCredentialParameters>    cryptoParameters,
         BufferSource                            attestationChallenge,
         optional ScopedCredentialOptions        options
     );