Skip to content

Commit

Permalink
support virtual authenticator functions in webdriver (#41377)
Browse files Browse the repository at this point in the history
Depends on D185198

Differential Revision: https://phabricator.services.mozilla.com/D162624

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1676679
gecko-commit: d918661c17e3b35d0fdc71e621020e4f2fbf51dd
gecko-reviewers: webdriver-reviewers, jgraham, whimboo

Co-authored-by: Dana Keeler <[email protected]>
  • Loading branch information
moz-wptsync-bot and mozkeeler authored Sep 1, 2023
1 parent 0531410 commit f8eef42
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tools/wptrunner/wptrunner/executors/executormarionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@


def do_delayed_imports():
global errors, marionette, Addons
global errors, marionette, Addons, WebAuthn

from marionette_driver import marionette, errors
from marionette_driver.addons import Addons
from marionette_driver.webauthn import WebAuthn


def _switch_to_window(marionette, handle):
Expand Down Expand Up @@ -590,28 +591,28 @@ def generate_test_report(self, config):

class MarionetteVirtualAuthenticatorProtocolPart(VirtualAuthenticatorProtocolPart):
def setup(self):
self.marionette = self.parent.marionette
self.webauthn = WebAuthn(self.parent.marionette)

def add_virtual_authenticator(self, config):
raise NotImplementedError("add_virtual_authenticator not yet implemented")
return self.webauthn.add_virtual_authenticator(config)

def remove_virtual_authenticator(self, authenticator_id):
raise NotImplementedError("remove_virtual_authenticator not yet implemented")
self.webauthn.remove_virtual_authenticator(authenticator_id)

def add_credential(self, authenticator_id, credential):
raise NotImplementedError("add_credential not yet implemented")
self.webauthn.add_credential(authenticator_id, credential)

def get_credentials(self, authenticator_id):
raise NotImplementedError("get_credentials not yet implemented")
return self.webauthn.get_credentials(authenticator_id)

def remove_credential(self, authenticator_id, credential_id):
raise NotImplementedError("remove_credential not yet implemented")
self.webauthn.remove_credential(authenticator_id, credential_id)

def remove_all_credentials(self, authenticator_id):
raise NotImplementedError("remove_all_credentials not yet implemented")
self.webauthn.remove_all_credentials(authenticator_id)

def set_user_verified(self, authenticator_id, uv):
raise NotImplementedError("set_user_verified not yet implemented")
self.webauthn.set_user_verified(authenticator_id, uv)


class MarionetteSetPermissionProtocolPart(SetPermissionProtocolPart):
Expand Down

0 comments on commit f8eef42

Please sign in to comment.