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

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

Issue 2787153002: MD Settings: Move easy unlock from people to lock screen. (Closed)
Patch Set: Comment. 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/easy_unlock_browsertest_chromeos.js
diff --git a/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js b/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
index 2659015423078d5623788d730c0f07a342f0c0bc..9069b2bc0e16028433729812d91b4ec4b44f9abf 100644
--- a/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
@@ -37,7 +37,7 @@ GEN('#else');
GEN('#define MAYBE_EasyUnlock EasyUnlock');
GEN('#endif');
-// Runs change picture tests.
+// Runs easy unlock tests.
TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
/**
* A test version of EasyUnlockBrowserProxy. Provides helper methods
@@ -99,20 +99,14 @@ TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
},
};
- /** @type {?SettingsPeoplePageElement} */
- var page = null;
+ /** @type {?SettingsLockScreenElement} */
+ var lockScreen = null;
/** @type {?TestEasyUnlockBrowserProxy} */
var browserProxy = null;
- /** @type {?CrSettingsPrefs} */
- var prefs = null;
-
- var self = this;
-
suite('SettingsEasyUnlock', function() {
suiteSetup(function() {
- self.basicPage.set('pageVisibility.people', true);
Polymer.dom.flush();
// These overrides are necessary for this test to function on ChromeOS
@@ -131,10 +125,6 @@ TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
easyUnlockTurnOffDescription: '',
easyUnlockTurnOffButton: '',
});
-
- // Before clearing the body, save a copy of the real prefs so we can
- // cleanly re-create the People page element.
- prefs = document.querySelector('settings-ui').$$('settings-prefs').prefs;
});
setup(function() {
@@ -142,25 +132,19 @@ TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
settings.EasyUnlockBrowserProxyImpl.instance_ = browserProxy;
PolymerTest.clearBody();
- page = document.createElement('settings-people-page');
- page.currentRoute = {
- page: 'basic',
- section: '',
- subpage: [],
- };
- page.prefs = prefs;
+ lockScreen = document.createElement('settings-lock-screen');
});
test('setup button', function() {
- document.body.appendChild(page);
+ document.body.appendChild(lockScreen);
return browserProxy.whenCalled('getEnabledStatus').then(function() {
- assertTrue(page.easyUnlockAllowed_);
- expectFalse(page.easyUnlockEnabled_);
+ assertTrue(lockScreen.easyUnlockAllowed_);
+ expectFalse(lockScreen.easyUnlockEnabled_);
Polymer.dom.flush();
- var setupButton = page.$$('#easyUnlockSetup');
+ var setupButton = lockScreen.$$('#easyUnlockSetup');
assertTrue(!!setupButton);
expectFalse(setupButton.hidden);
@@ -171,17 +155,17 @@ TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
test('turn off dialog', function() {
browserProxy.setEnabledStatus(true);
- document.body.appendChild(page);
+ document.body.appendChild(lockScreen);
var turnOffDialog = null;
return browserProxy.whenCalled('getEnabledStatus').then(function() {
- assertTrue(page.easyUnlockAllowed_);
- expectTrue(page.easyUnlockEnabled_);
+ assertTrue(lockScreen.easyUnlockAllowed_);
+ expectTrue(lockScreen.easyUnlockEnabled_);
Polymer.dom.flush();
- var turnOffButton = page.$$('#easyUnlockTurnOff');
+ var turnOffButton = lockScreen.$$('#easyUnlockTurnOff');
assertTrue(!!turnOffButton);
expectFalse(turnOffButton.hidden)
@@ -190,7 +174,7 @@ TEST_F('SettingsEasyUnlockBrowserTest', 'MAYBE_EasyUnlock', function() {
}).then(function() {
Polymer.dom.flush();
- turnOffDialog = page.$$('#easyUnlockTurnOffDialog');
+ turnOffDialog = lockScreen.$$('#easyUnlockTurnOffDialog');
assertTrue(!!turnOffDialog);
// Verify that elements on the turn off dialog are hidden or active

Powered by Google App Engine
This is Rietveld 408576698