Commit eda97a92 authored by Balazs Engedy's avatar Balazs Engedy Committed by Commit Bot

Update WebAuthn UX strings with final-ish revisions.

Screenshots for strings will be uploaded in a follow-up CL.

This CL also improves the naming of some string constants, as well as deduplicates
the two USB activation sheets (register/sign) into just one.

Bug: 849323
Change-Id: I37709d65c6fe980dff18d1b98d070a66f4d90115
TBR: jcivelli@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1178285Reviewed-by: default avatarJun Choi <hongjunchoi@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583853}
parent ea3f82d0
...@@ -9039,99 +9039,144 @@ Please help our engineers fix this problem. Tell us what happened right before y ...@@ -9039,99 +9039,144 @@ Please help our engineers fix this problem. Tell us what happened right before y
<!-- Web-modal dialog shown during Web Authenticaton API requests. --> <!-- Web-modal dialog shown during Web Authenticaton API requests. -->
<if expr="is_win or is_macosx or desktop_linux or chromeos"> <if expr="is_win or is_macosx or desktop_linux or chromeos">
<message name="IDS_WEBAUTHN_INITIAL_SHEET_TITLE" desc="Title of the dialog shown when a web site wants to register/verify a user's security key through the Web Authentication API."> <message name="IDS_WEBAUTHN_GENERIC_TITLE" desc="Title of most dialogs shown while the user is authenticating on a web site using a Security Key.">
<ph name="APP_NAME">$1<ex>google.com</ex></ph> wants to verify your identity Use your Security Key with <ph name="APP_NAME">$1<ex>google.com</ex></ph>
</message> </message>
<message name="IDS_WEBAUTHN_INITIAL_SHEET_DESCRIPTION" desc="Contents of the dialog shown when a web site wants to register/verify a user's security key through the Web Authentication API."> <message name="IDS_WEBAUTHN_WELCOME_SCREEN_TITLE" desc="Title of the dialog shown the very first time the user wants to authenticate on a web site using a Security Key.">
Verifying your identity helps protect your private data <ph name="APP_NAME">$1<ex>google.com</ex></ph> wants to verify your identity
</message> </message>
<message name="IDS_WEBAUTHN_INITIAL_SHEET_NEXT" desc="Contents of the button shown to let the user continue to register/verify his/her identity via using a security key."> <message name="IDS_WEBAUTHN_WELCOME_SCREEN_DESCRIPTION" desc="Description in the dialog shown the very first time the user wants to authenticate on a web site using a Security Key.">
Verifying your identity helps protect your personal information
</message>
<message name="IDS_WEBAUTHN_WELCOME_SCREEN_NEXT" desc="Button text to continue using a Security Key for authentication on the web for the very first time.">
Continue Continue
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_SELECTION_TITLE" desc="Title of the dialog shown when instructing the user to choose transport type to use to register/verfify using a security key."> <message name="IDS_WEBAUTHN_TRANSPORT_SELECTION_TITLE" desc="Title of the dialog instructing the user to choose how they want to connect their Security Key with their computer, e.g. USB or Bluetooth.">
Verify your identity with <ph name="APP_NAME">$1<ex>google.com</ex></ph> Verify your identity with <ph name="APP_NAME">$1<ex>google.com</ex></ph>
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_SELECTION_DESCRIPTION" desc="Contents of the dialog shown when instructing the user to choose transport type for the security key to be used by the Web Authentication API."> <message name="IDS_WEBAUTHN_TRANSPORT_SELECTION_DESCRIPTION" desc="Description in the dialog instructing the user to choose how they want to connect their Security Key with their computer, e.g. USB or Bluetooth.">
Pick an option Pick an option
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_BLE" desc="Use a Security Key with the Web Authentication API over Bluetooth Low Energy."> <message name="IDS_WEBAUTHN_TRANSPORT_BLE" desc="Menu item text. The user selects this to use a Security Key (an external physcial device for user authentication) connected to the computer over Bluetooth Low Energy.">
Use your Security Key with Bluetooth Bluetooth Security Key
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_USB" desc="Use a Security Key with the Web Authentication API over Universal Serial Bus (USB)."> <message name="IDS_WEBAUTHN_TRANSPORT_USB" desc="Menu item text. The user selects this to use a Security Key (an external physical device for user authentication) plugged in to the USB port of the computer.">
Use your Security Key with USB USB Security Key
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_NFC" desc="Use a Security Key with the Web Authentication API over Near-Field Communication (NFC)."> <message name="IDS_WEBAUTHN_TRANSPORT_NFC" desc="Menu item text. The user selects this to use a Security Key (an external physical device for user authentication) connected to the computer over Near-Field Communication.">
Use your Security Key with NFC NFC Security Key
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_INTERNAL" desc="Use a Security Key with the Web Authentication API that is built in to the platform, such as Touch ID or Face ID."> <message name="IDS_WEBAUTHN_TRANSPORT_INTERNAL" desc="Menu item text. The user selects this to use a hardware-based authentication mechanism that is built in to the computer, such as a fingerprint reader.">
Use a built-in Security Key Built-in sensor
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_CABLE" desc="Use a phone as a Security Key over cloud-assisted BLE with the Web Authentication API."> <message name="IDS_WEBAUTHN_TRANSPORT_CABLE" desc="Menu item text. The user selects this to use their phone, once connected to their computer over Bluetooth Low Energy, to sign in to web site on their computer.">
Use your phone as a Security Key Your phone
</message> </message>
<message name="IDS_WEBAUTHN_USB_TITLE_ON_REGISTER" desc="Title of the dialog shown when the user has choosen to access their security key through USB during registration."> <message name="IDS_WEBAUTHN_USB_ACTIVATE_DESCRIPTION" desc="Description in the dialog instructing the user to plug in and activate (e.g. press a button on) their USB Security Key (an external physcial device for user authentication).">
Use USB Security Key Plug in your Security Key and activate it
</message> </message>
<message name="IDS_WEBAUTHN_USB_TITLE_ON_SIGNIN" desc="Title of the dialog shown when the user has choosen to access their security key through USB during sign-in."> <message name="IDS_WEBAUTHN_USB_SUCCESS_TITLE" desc="Title of the dialog informing the user that Chrome detected that they activated (e.g. pressed a button on) an external physical device used for authentication.">
Use USB Security Key with <ph name="APP_NAME">$1<ex>google.com</ex></ph> Touch registered...
</message> </message>
<message name="IDS_WEBAUTHN_USB_INSERT_DESCRIPTION" desc="Contents of the dialog shown instructing the user to plug in their USB security key."> <message name="IDS_WEBAUTHN_ERROR_GENERIC_TITLE" desc="Title of most dialogs shown when an error occurs while the user trying to sign in to a web site using a hardware-based authentication mechanism.">
Plug in your Security Key and activate it Something went wrong...
</message> </message>
<message name="IDS_WEBAUTHN_TIMEOUT_TITLE" desc="Title of the dialog shown when the Web Authentication request times out."> <message name="IDS_WEBAUTHN_ERROR_WRONG_KEY_DESCRIPTION" desc="Description in the dialog informing the user that they are trying to use the wrong Security Key (an external physical device for user authentication) to sign in to a given web site, that is, not the one they have previously registered on that site." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
Time out You have registered with a different key before
</message> </message>
<message name="IDS_WEBAUTHN_TIMEOUT_DESCRIPTION" desc="Contents of the dialog shown when Web Authentication request times out due to inactivity or error."> <message name="IDS_WEBAUTHN_ERROR_TIMEOUT_DESCRIPTION" desc="Description in the dialog shown when the user takes too long to sign in to a web site using a hardware-based authentication mechanism.">
The request timed out The request timed out
</message> </message>
<message name="IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_TITLE" desc="Title of the dialog shown when instructing the user to manually turn on Bluetooth so that security keys can be used over Bluetooth."> <message name="IDS_WEBAUTHN_ERROR_NO_TRANSPORTS_DESCRIPTION" desc="Description in the dialog shown when the user's could not sign in to a web site, because their computer did not support any of the hardware-based authentication mechanisms desired by the web site.">
Turn on Bluetooth We could not verify your identity on this device
</message>
<message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_AUTO_TITLE" desc="Title of the dialog informing the user that Chrome needs to turn on Bluetooth by itself so that Security Keys can be used over Bluetooth.">
Turn on Bluetooth?
</message>
<message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_AUTO_DESCRIPTION" desc="Description in the dialog informing the user that Chrome needs to turn on Bluetooth by itself so that Security Keys (external physical devices for user authentication) can be used over Bluetooth.">
Bluetooth will be temporarily turned on to communicate with your Security Key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_DESCRIPTION" desc="Contents of the dialog shown instructing the user to turn on bluetooth so that security keys can be used over Bluetooth."> <message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_AUTO_NEXT" desc="Button text to allow Chrome to turn on Bluetooth so that Security Keys can be used over Bluetooth.">
Turn on
</message>
<message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_TITLE" desc="Title of the dialog requesting the user to manually turn on Bluetooth so that Security Keys can be used over Bluetooth.">
Turn on Bluetooth?
</message>
<message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_DESCRIPTION" desc="Description in the dialog requesting the user to manually turn on Bluetooth so that Security Keys (external physical devices for user authentication)can be used over Bluetooth.">
Your Security Key only works when your device's Bluetooth is on Your Security Key only works when your device's Bluetooth is on
</message> </message>
<message name="IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_TRY_AGAIN" desc="Contents of the button shown to let the user restart the Bluetooth pairing process with Bluetooth powered on."> <message name="IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_NEXT" desc="Button text. The user clicks this once they manually turned on Bluetooth, so that Chrome would retry connecting to Security Keys over Bluetooth.">
Try again Try again
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_TITLE" desc="Title of the dialog shown when preparing the user to pair Bluetooth security key."> <message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_TITLE" desc="Title of the dialog explaining to the user that they first need to pair a Bluetooth Security Key (an external physical device for user authentication) with their computer, and only after they can use it to sign in to web sites on their computer.">
Ready to pair your Security Key? Ready to pair your Security Key?
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_DESCRIPTION" desc="Contents of the dialog shown when initiating the user to pair Bluetooth security key."> <message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_DESCRIPTION" desc="Description in the dialog explaining to the user that they first need to pair a Bluetooth Security Key (an external physical device for user authentication) with their computer, and only after they can use it to sign in to web sites on their computer." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
Pair your key to this device so you can use it to sign into your account Pair your key to this device so you can use it to sign into your account
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_START" desc="Contents of the button that lets the user initiate Bluetooth pairing process."> <message name="IDS_WEBAUTHN_BLE_PAIRING_BEGIN_NEXT" desc="Button text to initiate pairing of a Bluetooth Security Key with their computer.">
Begin Begin
</message>
<message name="IDS_WEBAUTHN_BLE_ENTER_PAIRING_MODE_TITLE" desc="Title of the dialog shown when instructing the user to put security key into pairing mode.">
Allow the use of your Security Key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_ENTER_PAIRING_MODE_DESCRIPTION" desc="Contents of the dialog shown when instructing the user to put security key into pairing mode."> <message name="IDS_WEBAUTHN_BLE_ENTER_PAIRING_MODE_DESCRIPTION" desc="Description in the dialog instructing the user to put their Bluetooth Security Key (an external physical device for user authentication) into pairing mode. This is achieved by holding down the button on the device for 5 seconds, or longer.">
Press and hold the button on your Security Key for at least 5 seconds Press and hold the button on your Security Key for at least 5 seconds
</message> </message>
<message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_TITLE" desc="Title of the dialog shown when instructing the user to select security key to connect."> <message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_TITLE" desc="Title of the dialog instructing the user to select their Bluetooth Security Key (an external physical device for user authentication) from a list of nearby Bluetooth devices. The user can identify their Security Key in the list by the name printed on the back of the Security Key.">
Select your Security Key Select your Security Key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_DESCRIPTION" desc="Contents of the dialog shown when instructing the user to select his/her security key from list of near by BLE devices."> <message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_DESCRIPTION" desc="Description in the dialog instructing the user to select their Bluetooth Security Key (an external physical device for user authentication) from a list of nearby Bluetooth devices. The user can identify their Security Key in the list by the name printed on the back of the Security Key." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
Find the name printed on the back of your key Find the name printed on the back of your key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_TITLE" desc="Title of the dialog shown when instructing the user to enter the PIN code to pair a Bluetooth security key."> <message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_SEARCHING_LABEL" desc="Label text. Displayed while Chrome is scanning for nearby Bluetooth devices.">
Searching...
</message>
<message name="IDS_WEBAUTHN_BLE_DEVICE_SELECTION_REMINDER_LABEL" desc="Label text. Reminds the user that their Bluetooth Security Key (an external physical device for user authentication) will only show up in the list of nearby Bluetooth devices if they put it into pairing mode. This is achieved by holding down the button on the device for 5 seconds, or longer." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
To see your Security Key, it needs to be in pairing mode. Press the button on your key for at least 5 seconds.
</message>
<message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_TITLE" desc="Title of the dialog shown when instructing the user to enter the PIN code (a 6-digit number) to pair a Bluetooth Security Key (an external physical device for user authentication) with their computer.">
Pair with <ph name="DEVICE_NAME">$1<ex>VHGSHSSN</ex></ph> Pair with <ph name="DEVICE_NAME">$1<ex>VHGSHSSN</ex></ph>
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_DESCRIPTION" desc="Contents of the dialog shown when instructing the user to enter the PIN code to pair a Bluetooth security key."> <message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_DESCRIPTION" desc="Description in the dialog shown when instructing the user to enter the PIN code to pair a Bluetooth Security Key (an external physical device for user authentication) with their computer. The PIN code is a 6-digit secret number written on the back of the device." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
Find the 6-digit PIN on the back of your key Find the 6-digit PIN on the back of your key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_NEXT" desc="Contents of the button that lets the user continue the pairing process with the entered Bluetooth PIN code."> <message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_PIN_LABEL" desc="Label text. Displayed next to a text box where the user enters the PIN code (a 6-digit number) to pair a Bluetooth device.">
Next Pin
</message> </message>
<message name="IDS_WEBAUTHN_BLE_VERIFYING_TITLE" desc="Title of the dialog shown when the user has established BLE connection with the security key."> <message name="IDS_WEBAUTHN_BLE_PIN_ENTRY_NEXT" desc="Button text. The user clicks this button once they have entered the PIN code (a 6-digit number) into a text vbox, so that the pairing of the Bluetooth device can continue.">
Verifying your Security Key Next
</message> </message>
<message name="IDS_WEBAUTHN_BLE_ACTIVATE_TITLE" desc="Title of the dialog shown when the user tries to sign-in using a security key."> <message name="IDS_WEBAUTHN_BLE_OS_PIN_ENTRY_TITLE" desc="Description in the dialog instructing the user to enter the PIN code to pair a Bluetooth Security Key (an external physical device for user authentication) with their computer. The PIN code is a 6-digit secret number written on the back of the device." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
Use your Security Key with <ph name="APP_NAME">$1<ex>airbnb.com</ex></ph> Find the 6-digit PIN on the back of your key
</message> </message>
<message name="IDS_WEBAUTHN_BLE_ACTIVATE_DESCRIPTION" desc="Contents of the dialog shown when the user tries to sign-in using a security key."> <message name="IDS_WEBAUTHN_BLE_OS_PIN_ENTRY_DESCRIPTION" desc="Description in the drepresenting using the user's phone as a physical device that is connected to the user's computer over Bluetooth Low Energy to authenticate the user on the web.ialog shown when instructing the user to enter the PIN code to pair a Bluetooth Security Key (an external physical device for user authentication).">
Continue when you're ready to enter the PIN
</message>
<message name="IDS_WEBAUTHN_BLE_VERIFYING_TITLE" desc="Title of the dialog informing the user that verifying a Bluetooth Security Key (an external physical device for user authentication) is in progress.">
Verifying your Security Key...
</message>
<message name="IDS_WEBAUTHN_BLE_ACTIVATE_DESCRIPTION" desc="Description in the dialog instructing the user to activate (e.g. press a button on) their Bluetooth Security Key (an external physical device for user authentication)." meaning="Here, `key` refers to a Security Key, an external physical device for user authentication.">
To use most keys, simply press the button To use most keys, simply press the button
</message> </message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_LABEL" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a different hardware-based authentication mechanism from what they have selected previously.">
Choose another option
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_USB" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a Security Key (an external physcial device for user authentication) plugged in to the USB port of the computer.">
Verify via USB
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_BLE" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a Security Key (an external physcial device for user authentication) connected to the user's computer over Bluetooth Low Energy.">
Verify via Bluetooth
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_ANOTHER_BLE" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a Bluetooth Security Key (an external physcial device for user authentication connected over Bluetooth Low Energy) that they haven't used on this computer before.">
Add another Bluetooth Security Key
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_NFC" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a Security Key (an external physcial device for user authentication) connected to the computer over Near-Field Communication.">
Verify via NFC
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_INTERNAL" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using a hardware-based authentication mechanism that is built in to the computer, such as a fingerprint reader.">
Verify via built-in sensor
</message>
<message name="IDS_WEBAUTHN_TRANSPORT_POPUP_CABLE" desc="Menu item text. The user selects this to verify their identity on a web site (i.e. sign in) using their phone. They wirelessly connect their phone to their computer over Bluetooth Low Energy, and then use the phone to sign in to web sites on their computer.">
Verify via your phone
</message>
</if> </if>
<if expr="is_macosx"> <if expr="is_macosx">
<message name="IDS_WEBAUTHN_TOUCH_ID_TITLE" desc="Title of the dialog shown when the user tries to sign in with Touch ID." meaning="'Touch ID' is the fingerprint recognition feature in macOS. Try to refer Apple support documentation in the target language for the appropriate product name translation."> <message name="IDS_WEBAUTHN_TOUCH_ID_TITLE" desc="Title of the dialog shown when the user tries to sign in with Touch ID." meaning="'Touch ID' is the fingerprint recognition feature in macOS. Try to refer Apple support documentation in the target language for the appropriate product name translation.">
......
...@@ -34,7 +34,7 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf( ...@@ -34,7 +34,7 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf(
std::unique_ptr<AuthenticatorRequestSheetView> sheet_view; std::unique_ptr<AuthenticatorRequestSheetView> sheet_view;
switch (dialog_model->current_step()) { switch (dialog_model->current_step()) {
case Step::kInitial: case Step::kWelcomeScreen:
sheet_view = std::make_unique<AuthenticatorRequestSheetView>( sheet_view = std::make_unique<AuthenticatorRequestSheetView>(
std::make_unique<AuthenticatorInitialSheetModel>(dialog_model)); std::make_unique<AuthenticatorInitialSheetModel>(dialog_model));
break; break;
...@@ -43,15 +43,9 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf( ...@@ -43,15 +43,9 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf(
std::make_unique<AuthenticatorTransportSelectorSheetModel>( std::make_unique<AuthenticatorTransportSelectorSheetModel>(
dialog_model)); dialog_model));
break; break;
case Step::kUsbInsertAndActivateOnRegister: case Step::kUsbInsertAndActivate:
sheet_view = std::make_unique<AuthenticatorRequestSheetView>( sheet_view = std::make_unique<AuthenticatorRequestSheetView>(
std::make_unique< std::make_unique<AuthenticatorInsertAndActivateUsbSheetModel>(
AuthenticatorInsertAndActivateUsbOnRegisterSheetModel>(
dialog_model));
break;
case Step::kUsbInsertAndActivateOnSign:
sheet_view = std::make_unique<AuthenticatorRequestSheetView>(
std::make_unique<AuthenticatorInsertAndActivateUsbOnSignSheetModel>(
dialog_model)); dialog_model));
break; break;
case Step::kErrorTimedOut: case Step::kErrorTimedOut:
......
...@@ -34,12 +34,9 @@ class AuthenticatorDialogTest : public DialogBrowserTest { ...@@ -34,12 +34,9 @@ class AuthenticatorDialogTest : public DialogBrowserTest {
AuthenticatorTransport::kCloudAssistedBluetoothLowEnergy); AuthenticatorTransport::kCloudAssistedBluetoothLowEnergy);
model->SetCurrentStep( model->SetCurrentStep(
AuthenticatorRequestDialogModel::Step::kTransportSelection); AuthenticatorRequestDialogModel::Step::kTransportSelection);
} else if (name == "insert_usb_register") { } else if (name == "activate_usb") {
model->SetCurrentStep(AuthenticatorRequestDialogModel::Step::
kUsbInsertAndActivateOnRegister);
} else if (name == "insert_usb_sign") {
model->SetCurrentStep( model->SetCurrentStep(
AuthenticatorRequestDialogModel::Step::kUsbInsertAndActivateOnSign); AuthenticatorRequestDialogModel::Step::kUsbInsertAndActivate);
} else if (name == "timeout") { } else if (name == "timeout") {
model->SetCurrentStep( model->SetCurrentStep(
AuthenticatorRequestDialogModel::Step::kErrorTimedOut); AuthenticatorRequestDialogModel::Step::kErrorTimedOut);
...@@ -91,11 +88,7 @@ IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_transports) { ...@@ -91,11 +88,7 @@ IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_transports) {
ShowAndVerifyUi(); ShowAndVerifyUi();
} }
IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_insert_usb_register) { IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_activate_usb) {
ShowAndVerifyUi();
}
IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_insert_usb_sign) {
ShowAndVerifyUi(); ShowAndVerifyUi();
} }
......
...@@ -90,12 +90,12 @@ base::string16 AuthenticatorInitialSheetModel::GetStepTitle() const { ...@@ -90,12 +90,12 @@ base::string16 AuthenticatorInitialSheetModel::GetStepTitle() const {
// TODO(hongjunchoi): Insert actual domain name from model to // TODO(hongjunchoi): Insert actual domain name from model to
// |application_name|. // |application_name|.
base::string16 application_name = base::UTF8ToUTF16("example.com"); base::string16 application_name = base::UTF8ToUTF16("example.com");
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_INITIAL_SHEET_TITLE, return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_TITLE,
application_name); application_name);
} }
base::string16 AuthenticatorInitialSheetModel::GetStepDescription() const { base::string16 AuthenticatorInitialSheetModel::GetStepDescription() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_INITIAL_SHEET_DESCRIPTION); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_DESCRIPTION);
} }
bool AuthenticatorInitialSheetModel::IsAcceptButtonVisible() const { bool AuthenticatorInitialSheetModel::IsAcceptButtonVisible() const {
...@@ -107,14 +107,14 @@ bool AuthenticatorInitialSheetModel::IsAcceptButtonEnabled() const { ...@@ -107,14 +107,14 @@ bool AuthenticatorInitialSheetModel::IsAcceptButtonEnabled() const {
} }
base::string16 AuthenticatorInitialSheetModel::GetAcceptButtonLabel() const { base::string16 AuthenticatorInitialSheetModel::GetAcceptButtonLabel() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_INITIAL_SHEET_NEXT); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_NEXT);
} }
void AuthenticatorInitialSheetModel::OnAccept() { void AuthenticatorInitialSheetModel::OnAccept() {
// TODO(hongjunchoi): Check whether Bluetooth adapter is enabled and if it is, // TODO(hongjunchoi): Check whether Bluetooth adapter is enabled and if it is,
// set current step to |kTransportSelection|. // set current step to |kTransportSelection|.
dialog_model()->SetCurrentStep( dialog_model()->SetCurrentStep(
AuthenticatorRequestDialogModel::Step::kUsbInsertAndActivateOnRegister); AuthenticatorRequestDialogModel::Step::kUsbInsertAndActivate);
} }
// AuthenticatorTransportSelectorSheetModel ----------------------------------- // AuthenticatorTransportSelectorSheetModel -----------------------------------
...@@ -143,44 +143,25 @@ void AuthenticatorTransportSelectorSheetModel::OnTransportSelected( ...@@ -143,44 +143,25 @@ void AuthenticatorTransportSelectorSheetModel::OnTransportSelected(
dialog_model()->StartGuidedFlowForTransport(transport); dialog_model()->StartGuidedFlowForTransport(transport);
} }
// AuthenticatorInsertAndActivateUsbOnRegisterSheetModel ---------------------- // AuthenticatorInsertAndActivateUsbSheetModel ----------------------
gfx::ImageSkia* gfx::ImageSkia*
AuthenticatorInsertAndActivateUsbOnRegisterSheetModel::GetStepIllustration() AuthenticatorInsertAndActivateUsbSheetModel::GetStepIllustration() const {
const {
return GetImage(IDR_WEBAUTHN_ILLUSTRATION_USB_1X); return GetImage(IDR_WEBAUTHN_ILLUSTRATION_USB_1X);
} }
base::string16 base::string16 AuthenticatorInsertAndActivateUsbSheetModel::GetStepTitle()
AuthenticatorInsertAndActivateUsbOnRegisterSheetModel::GetStepTitle() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_USB_TITLE_ON_REGISTER);
}
base::string16
AuthenticatorInsertAndActivateUsbOnRegisterSheetModel::GetStepDescription()
const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_USB_INSERT_DESCRIPTION);
}
// AuthenticatorInsertAndActivateUsbOnSignSheetModel ----------------------
gfx::ImageSkia*
AuthenticatorInsertAndActivateUsbOnSignSheetModel::GetStepIllustration() const {
return GetImage(IDR_WEBAUTHN_ILLUSTRATION_USB_1X);
}
base::string16 AuthenticatorInsertAndActivateUsbOnSignSheetModel::GetStepTitle()
const { const {
// TODO(hongjunchoi): Insert actual domain name from model to // TODO(hongjunchoi): Insert actual domain name from model to
// |application_name|. // |application_name|.
base::string16 application_name = base::UTF8ToUTF16("example.com"); base::string16 application_name = base::UTF8ToUTF16("example.com");
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_USB_TITLE_ON_SIGNIN, return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_GENERIC_TITLE,
application_name); application_name);
} }
base::string16 base::string16 AuthenticatorInsertAndActivateUsbSheetModel::GetStepDescription()
AuthenticatorInsertAndActivateUsbOnSignSheetModel::GetStepDescription() const { const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_USB_INSERT_DESCRIPTION); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_USB_ACTIVATE_DESCRIPTION);
} }
// AuthenticatorTimeoutErrorModel --------------------------------------------- // AuthenticatorTimeoutErrorModel ---------------------------------------------
...@@ -190,11 +171,11 @@ gfx::ImageSkia* AuthenticatorTimeoutErrorModel::GetStepIllustration() const { ...@@ -190,11 +171,11 @@ gfx::ImageSkia* AuthenticatorTimeoutErrorModel::GetStepIllustration() const {
} }
base::string16 AuthenticatorTimeoutErrorModel::GetStepTitle() const { base::string16 AuthenticatorTimeoutErrorModel::GetStepTitle() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_TIMEOUT_TITLE); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_ERROR_GENERIC_TITLE);
} }
base::string16 AuthenticatorTimeoutErrorModel::GetStepDescription() const { base::string16 AuthenticatorTimeoutErrorModel::GetStepDescription() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_TIMEOUT_DESCRIPTION); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_ERROR_TIMEOUT_DESCRIPTION);
} }
// AuthenticatorBlePowerOnManualSheetModel ------------------------------------ // AuthenticatorBlePowerOnManualSheetModel ------------------------------------
...@@ -205,13 +186,14 @@ gfx::ImageSkia* AuthenticatorBlePowerOnManualSheetModel::GetStepIllustration() ...@@ -205,13 +186,14 @@ gfx::ImageSkia* AuthenticatorBlePowerOnManualSheetModel::GetStepIllustration()
} }
base::string16 AuthenticatorBlePowerOnManualSheetModel::GetStepTitle() const { base::string16 AuthenticatorBlePowerOnManualSheetModel::GetStepTitle() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_TITLE); return l10n_util::GetStringUTF16(
IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_TITLE);
} }
base::string16 AuthenticatorBlePowerOnManualSheetModel::GetStepDescription() base::string16 AuthenticatorBlePowerOnManualSheetModel::GetStepDescription()
const { const {
return l10n_util::GetStringUTF16( return l10n_util::GetStringUTF16(
IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_DESCRIPTION); IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_DESCRIPTION);
} }
bool AuthenticatorBlePowerOnManualSheetModel::IsAcceptButtonVisible() const { bool AuthenticatorBlePowerOnManualSheetModel::IsAcceptButtonVisible() const {
...@@ -224,7 +206,7 @@ bool AuthenticatorBlePowerOnManualSheetModel::IsAcceptButtonEnabled() const { ...@@ -224,7 +206,7 @@ bool AuthenticatorBlePowerOnManualSheetModel::IsAcceptButtonEnabled() const {
base::string16 AuthenticatorBlePowerOnManualSheetModel::GetAcceptButtonLabel() base::string16 AuthenticatorBlePowerOnManualSheetModel::GetAcceptButtonLabel()
const { const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_POWER_ON_MANUAL_TRY_AGAIN); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLUETOOTH_POWER_ON_MANUAL_NEXT);
} }
// AuthenticatorBlePairingBeginSheetModel ------------------------------------- // AuthenticatorBlePairingBeginSheetModel -------------------------------------
...@@ -253,7 +235,7 @@ bool AuthenticatorBlePairingBeginSheetModel::IsAcceptButtonEnabled() const { ...@@ -253,7 +235,7 @@ bool AuthenticatorBlePairingBeginSheetModel::IsAcceptButtonEnabled() const {
base::string16 AuthenticatorBlePairingBeginSheetModel::GetAcceptButtonLabel() base::string16 AuthenticatorBlePairingBeginSheetModel::GetAcceptButtonLabel()
const { const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_PAIRING_BEGIN_START); return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_PAIRING_BEGIN_NEXT);
} }
// AuthenticatorBleEnterPairingModeSheetModel --------------------------------- // AuthenticatorBleEnterPairingModeSheetModel ---------------------------------
...@@ -265,7 +247,11 @@ AuthenticatorBleEnterPairingModeSheetModel::GetStepIllustration() const { ...@@ -265,7 +247,11 @@ AuthenticatorBleEnterPairingModeSheetModel::GetStepIllustration() const {
base::string16 AuthenticatorBleEnterPairingModeSheetModel::GetStepTitle() base::string16 AuthenticatorBleEnterPairingModeSheetModel::GetStepTitle()
const { const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_BLE_ENTER_PAIRING_MODE_TITLE); // TODO(hongjunchoi): Insert actual domain name from model to
// |application_name|.
base::string16 application_name = base::UTF8ToUTF16("example.com");
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_GENERIC_TITLE,
application_name);
} }
base::string16 AuthenticatorBleEnterPairingModeSheetModel::GetStepDescription() base::string16 AuthenticatorBleEnterPairingModeSheetModel::GetStepDescription()
...@@ -348,7 +334,7 @@ base::string16 AuthenticatorBleActivateSheetModel::GetStepTitle() const { ...@@ -348,7 +334,7 @@ base::string16 AuthenticatorBleActivateSheetModel::GetStepTitle() const {
// TODO(hongjunchoi): Insert actual domain name from model to // TODO(hongjunchoi): Insert actual domain name from model to
// |application_name|. // |application_name|.
base::string16 application_name = base::UTF8ToUTF16("example.com"); base::string16 application_name = base::UTF8ToUTF16("example.com");
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_BLE_ACTIVATE_TITLE, return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_GENERIC_TITLE,
application_name); application_name);
} }
......
...@@ -83,19 +83,7 @@ class AuthenticatorTransportSelectorSheetModel ...@@ -83,19 +83,7 @@ class AuthenticatorTransportSelectorSheetModel
base::string16 GetStepDescription() const override; base::string16 GetStepDescription() const override;
}; };
class AuthenticatorInsertAndActivateUsbOnRegisterSheetModel class AuthenticatorInsertAndActivateUsbSheetModel
: public AuthenticatorSheetModelBase {
public:
using AuthenticatorSheetModelBase::AuthenticatorSheetModelBase;
private:
// AuthenticatorSheetModelBase:
gfx::ImageSkia* GetStepIllustration() const override;
base::string16 GetStepTitle() const override;
base::string16 GetStepDescription() const override;
};
class AuthenticatorInsertAndActivateUsbOnSignSheetModel
: public AuthenticatorSheetModelBase { : public AuthenticatorSheetModelBase {
public: public:
using AuthenticatorSheetModelBase::AuthenticatorSheetModelBase; using AuthenticatorSheetModelBase::AuthenticatorSheetModelBase;
......
...@@ -37,7 +37,7 @@ void AuthenticatorRequestDialogModel::StartGuidedFlowForTransport( ...@@ -37,7 +37,7 @@ void AuthenticatorRequestDialogModel::StartGuidedFlowForTransport(
DCHECK_EQ(current_step(), Step::kTransportSelection); DCHECK_EQ(current_step(), Step::kTransportSelection);
switch (transport) { switch (transport) {
case AuthenticatorTransport::kUsb: case AuthenticatorTransport::kUsb:
SetCurrentStep(Step::kUsbInsertAndActivateOnRegister); SetCurrentStep(Step::kUsbInsertAndActivate);
break; break;
case AuthenticatorTransport::kBluetoothLowEnergy: case AuthenticatorTransport::kBluetoothLowEnergy:
SetCurrentStep(Step::kBlePowerOnManual); SetCurrentStep(Step::kBlePowerOnManual);
...@@ -73,7 +73,7 @@ void AuthenticatorRequestDialogModel::FinishPairingWithPin( ...@@ -73,7 +73,7 @@ void AuthenticatorRequestDialogModel::FinishPairingWithPin(
} }
void AuthenticatorRequestDialogModel::TryUsbDevice() { void AuthenticatorRequestDialogModel::TryUsbDevice() {
DCHECK_EQ(current_step(), Step::kUsbInsertAndActivateOnRegister); DCHECK_EQ(current_step(), Step::kUsbInsertAndActivate);
} }
void AuthenticatorRequestDialogModel::TryTouchId() { void AuthenticatorRequestDialogModel::TryTouchId() {
...@@ -86,10 +86,10 @@ void AuthenticatorRequestDialogModel::Cancel() { ...@@ -86,10 +86,10 @@ void AuthenticatorRequestDialogModel::Cancel() {
} }
void AuthenticatorRequestDialogModel::Back() { void AuthenticatorRequestDialogModel::Back() {
if (current_step() == Step::kInitial) { if (current_step() == Step::kWelcomeScreen) {
Cancel(); Cancel();
} else { } else {
SetCurrentStep(Step::kInitial); SetCurrentStep(Step::kWelcomeScreen);
} }
} }
......
...@@ -24,14 +24,13 @@ class AuthenticatorRequestDialogModel { ...@@ -24,14 +24,13 @@ class AuthenticatorRequestDialogModel {
public: public:
// Defines the potential steps of the Web Authentication API request UX flow. // Defines the potential steps of the Web Authentication API request UX flow.
enum class Step { enum class Step {
kInitial, kWelcomeScreen,
kTransportSelection, kTransportSelection,
kErrorTimedOut, kErrorTimedOut,
kCompleted, kCompleted,
// Universal Serial Bus (USB). // Universal Serial Bus (USB).
kUsbInsertAndActivateOnRegister, kUsbInsertAndActivate,
kUsbInsertAndActivateOnSign,
// Bluetooth Low Energy (BLE). // Bluetooth Low Energy (BLE).
kBlePowerOnAutomatic, kBlePowerOnAutomatic,
...@@ -159,7 +158,7 @@ class AuthenticatorRequestDialogModel { ...@@ -159,7 +158,7 @@ class AuthenticatorRequestDialogModel {
private: private:
// The current step of the request UX flow that is currently shown. // The current step of the request UX flow that is currently shown.
Step current_step_ = Step::kInitial; Step current_step_ = Step::kWelcomeScreen;
TransportListModel transport_list_model_; TransportListModel transport_list_model_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer> observers_;
......
...@@ -81,8 +81,8 @@ void SetInitialUiModelBasedOnPreviouslyUsedTransport( ...@@ -81,8 +81,8 @@ void SetInitialUiModelBasedOnPreviouslyUsedTransport(
// TouchID transports. // TouchID transports.
switch (*previous_transport) { switch (*previous_transport) {
case device::FidoTransportProtocol::kUsbHumanInterfaceDevice: case device::FidoTransportProtocol::kUsbHumanInterfaceDevice:
model->SetCurrentStep(AuthenticatorRequestDialogModel::Step:: model->SetCurrentStep(
kUsbInsertAndActivateOnRegister); AuthenticatorRequestDialogModel::Step::kUsbInsertAndActivate);
break; break;
default: default:
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment