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

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

Issue 2823713002: md settings: Change action link to button on lock screen. (Closed)
Patch Set: Use offset width Created 3 years, 8 months 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 c6ddf85d2cc78a6758b3088bd737143353504851..9557b9d66edcac63a207f8b1adcacc5445bece5b 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
@@ -146,7 +146,6 @@ cr.define('settings_people_page_quick_unlock', function() {
var passwordRadioButton = null;
var pinPasswordRadioButton = null;
var noneRadioButton = null;
- var configureButton = null;
/**
* Asserts that only the given radio button is active and all of the
@@ -187,6 +186,12 @@ cr.define('settings_people_page_quick_unlock', function() {
fakeSettings.setPref(ENABLE_LOCK_SCREEN_PREF, value, '', assertTrue);
}
+ function isSetupPinButtonVisible() {
+ Polymer.dom.flush();
+ var setupPinButton = element.$$('#setupPinButton');
+ return isVisible(setupPinButton);
+ }
+
setup(function(done) {
PolymerTest.clearBody();
@@ -229,7 +234,6 @@ cr.define('settings_people_page_quick_unlock', function() {
getFromElement('paper-radio-button[name="password"]');
pinPasswordRadioButton =
getFromElement('paper-radio-button[name="pin+password"]');
- configureButton = getFromElement('a[is="action-link"]');
done();
});
@@ -252,7 +256,7 @@ cr.define('settings_people_page_quick_unlock', function() {
// Tap pin+password button.
MockInteractions.tap(pinPasswordRadioButton);
assertRadioButtonActive(pinPasswordRadioButton);
- assertTrue(isVisible(configureButton));
+ assertTrue(isSetupPinButtonVisible());
assertDeepEquals([], quickUnlockPrivateApi.activeModes);
// Enable quick unlock so that we verify tapping password disables it.
@@ -261,7 +265,7 @@ cr.define('settings_people_page_quick_unlock', function() {
// Tap password button and verify quick unlock is disabled.
MockInteractions.tap(passwordRadioButton);
assertRadioButtonActive(passwordRadioButton);
- assertFalse(isVisible(configureButton));
+ assertFalse(isSetupPinButtonVisible());
assertDeepEquals([], quickUnlockPrivateApi.activeModes);
}
@@ -281,7 +285,7 @@ cr.define('settings_people_page_quick_unlock', function() {
test('EnablingQuickUnlockChangesButtonState', function() {
setActiveModes([QuickUnlockMode.PIN]);
assertRadioButtonActive(pinPasswordRadioButton);
- assertTrue(isVisible(configureButton));
+ assertTrue(isSetupPinButtonVisible());
setActiveModes([]);
assertRadioButtonActive(passwordRadioButton);
@@ -296,10 +300,11 @@ cr.define('settings_people_page_quick_unlock', function() {
assertRadioButtonActive(passwordRadioButton);
MockInteractions.tap(pinPasswordRadioButton);
- assertTrue(isVisible(configureButton));
+ assertTrue(isSetupPinButtonVisible());
assertRadioButtonActive(pinPasswordRadioButton)
- MockInteractions.tap(configureButton);
+ Polymer.dom.flush();
+ MockInteractions.tap(getFromElement('#setupPinButton'));
var setupPinDialog = getFromElement('#setupPin');
assertTrue(setupPinDialog.$.dialog.open);
assertEquals(1, fakeUma.getHistogramValue(
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | third_party/polymer/v1_0/chromium.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698