Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10155)

Unified Diff: chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js

Issue 2376293005: cros: Tweaked the good/bad pin checking on the js to use the new quick unlock api function. (Closed)
Patch Set: Fixed patch set 9 errors. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js
diff --git a/chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js b/chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js
index a98564244923929a0f55c56f17c8d1d5ad7d7892..f2ce8b83ca1020374c81af9d774b9d3a478c6f75 100644
--- a/chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/quick_unlock_authenticate_browsertest_chromeos.js
@@ -320,6 +320,7 @@ cr.define('settings_people_page_quick_unlock', function() {
// Create setup-pin element.
element = document.createElement('settings-setup-pin-dialog');
+ element.quickUnlockPrivate_ = quickUnlockPrivateApi;
element.setModes =
quickUnlockPrivateApi.setModes.bind(quickUnlockPrivateApi, '');
@@ -384,13 +385,13 @@ cr.define('settings_people_page_quick_unlock', function() {
pinKeyboard.value = '11';
assertTrue(isVisible(problemDiv));
- assertHasClass(problemDiv, 'warning');
+ assertHasClass(problemDiv, 'error');
assertTrue(continueButton.disabled);
});
// If the PIN is weak a warning problem is shown.
test('WarningShownForWeakPins', function() {
- pinKeyboard.value = '111111';
+ pinKeyboard.value = '1111';
assertTrue(isVisible(problemDiv));
assertHasClass(problemDiv, 'warning');
@@ -407,8 +408,9 @@ cr.define('settings_people_page_quick_unlock', function() {
assertTrue(isVisible(problemDiv));
assertHasClass(problemDiv, 'warning');
- // Submitting a mistmatched PIN shows an error.
- MockInteractions.tap(continueButton);
+ // Submitting a mistmatched PIN shows an error. Directly call the button
+ // event since a tap on the disabled button does nothing.
+ element.onPinSubmit_();
assertHasClass(problemDiv, 'error');
// Changing the PIN changes the error to a warning.

Powered by Google App Engine
This is Rietveld 408576698