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..3e8cd5e90ba61e4ca2c00b8a9d3ab7f0a101d02f 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 |
@@ -322,6 +322,11 @@ cr.define('settings_people_page_quick_unlock', function() { |
element = document.createElement('settings-setup-pin-dialog'); |
element.setModes = |
quickUnlockPrivateApi.setModes.bind(quickUnlockPrivateApi, ''); |
+ element.checkCredential_ = |
+ quickUnlockPrivateApi.checkCredential.bind(quickUnlockPrivateApi); |
+ element.getCredentialRequirements_ = |
+ quickUnlockPrivateApi.getCredentialRequirements.bind( |
+ quickUnlockPrivateApi); |
document.body.appendChild(element); |
Polymer.dom.flush(); |
@@ -384,13 +389,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 +412,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. |