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

Side by Side Diff: chrome/test/data/webui/settings/people_page_test.js

Issue 2271843002: Settings People: Add /signOut route for Disconnect dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/route.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('settings_people_page', function() { 5 cr.define('settings_people_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {settings.ProfileInfoBrowserProxy} 8 * @implements {settings.ProfileInfoBrowserProxy}
9 * @extends {settings.TestBrowserProxy} 9 * @extends {settings.TestBrowserProxy}
10 */ 10 */
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Polymer.dom.flush(); 159 Polymer.dom.flush();
160 160
161 assertTrue(peoplePage.$.disconnectDialog.open); 161 assertTrue(peoplePage.$.disconnectDialog.open);
162 assertFalse(peoplePage.$.deleteProfile.hidden); 162 assertFalse(peoplePage.$.deleteProfile.hidden);
163 163
164 var disconnectConfirm = peoplePage.$.disconnectConfirm; 164 var disconnectConfirm = peoplePage.$.disconnectConfirm;
165 assertTrue(!!disconnectConfirm); 165 assertTrue(!!disconnectConfirm);
166 assertFalse(disconnectConfirm.hidden); 166 assertFalse(disconnectConfirm.hidden);
167 MockInteractions.tap(disconnectConfirm); 167 MockInteractions.tap(disconnectConfirm);
168 168
169 return browserProxy.whenCalled('signOut'); 169 // Wait for exit of dialog route.
170 return new Promise(function(resolve) {
171 window.addEventListener('popstate', function callback() {
172 window.removeEventListener('popstate', callback);
173 resolve(browserProxy.whenCalled('signOut'));
174 });
175 });
170 }).then(function(deleteProfile) { 176 }).then(function(deleteProfile) {
171 Polymer.dom.flush();
172
173 assertFalse(deleteProfile); 177 assertFalse(deleteProfile);
174 178
175 cr.webUIListenerCallback('sync-status-changed', { 179 cr.webUIListenerCallback('sync-status-changed', {
176 signedIn: true, 180 signedIn: true,
177 domain: 'example.com', 181 domain: 'example.com',
178 }); 182 });
179 Polymer.dom.flush(); 183 Polymer.dom.flush();
180 184
181 assertFalse(peoplePage.$.disconnectDialog.open); 185 assertFalse(peoplePage.$.disconnectDialog.open);
182 MockInteractions.tap(disconnectButton); 186 MockInteractions.tap(disconnectButton);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 249 }
246 250
247 return { 251 return {
248 registerTests: function() { 252 registerTests: function() {
249 registerProfileInfoTests(); 253 registerProfileInfoTests();
250 if (!cr.isChromeOS) 254 if (!cr.isChromeOS)
251 registerSyncStatusTests(); 255 registerSyncStatusTests();
252 }, 256 },
253 }; 257 };
254 }); 258 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/route.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698