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

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

Issue 2193073002: Fix CrSettingsPrivacyPageTest.PrivacyPage test failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Created 4 years, 4 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/site_settings/site_data.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_privacy_page', function() { 5 cr.define('settings_privacy_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @extends {TestBrowserProxy} 8 * @extends {TestBrowserProxy}
9 * @implements {settings.PrivacyPageBrowserProxy} 9 * @implements {settings.PrivacyPageBrowserProxy}
10 */ 10 */
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 var notice = element.$$('#notice'); 176 var notice = element.$$('#notice');
177 assertTrue(!!notice); 177 assertTrue(!!notice);
178 var noticeActionButton = notice.$$('.action-button'); 178 var noticeActionButton = notice.$$('.action-button');
179 assertTrue(!!noticeActionButton); 179 assertTrue(!!noticeActionButton);
180 180
181 assertTrue(element.$.dialog.open); 181 assertTrue(element.$.dialog.open);
182 assertTrue(notice.$.dialog.open); 182 assertTrue(notice.$.dialog.open);
183 183
184 MockInteractions.tap(noticeActionButton); 184 MockInteractions.tap(noticeActionButton);
185 185
186 // Tapping the action button will close the notice. Move to the 186 return new Promise(function(resolve, reject) {
187 // end of the message loop to allow the closing event to propagate 187 // Tapping the action button will close the notice. Move to the
188 // to the parent dialog. The parent dialog should subsequently 188 // end of the message loop to allow the closing event to
189 // close as well. 189 // propagate to the parent dialog. The parent dialog should
190 setTimeout(function() { 190 // subsequently close as well.
191 var notice = element.$$('#notice'); 191 setTimeout(function() {
192 assertFalse(!!notice); 192 var notice = element.$$('#notice');
193 assertFalse(element.$.dialog.open); 193 assertFalse(!!notice);
194 }, 0); 194 assertFalse(element.$.dialog.open);
195 resolve();
196 }, 0);
197 });
195 }); 198 });
196 }); 199 });
197 200
198 test('Counters', function() { 201 test('Counters', function() {
199 assertTrue(element.$.dialog.open); 202 assertTrue(element.$.dialog.open);
200 203
201 // Initialize the browsing history pref, which should belong to the 204 // Initialize the browsing history pref, which should belong to the
202 // first checkbox in the dialog. 205 // first checkbox in the dialog.
203 element.set('prefs', { 206 element.set('prefs', {
204 browser: { 207 browser: {
(...skipping 26 matching lines...) Expand all
231 234
232 return { 235 return {
233 registerTests: function() { 236 registerTests: function() {
234 if (cr.isMac || cr.isWin) 237 if (cr.isMac || cr.isWin)
235 registerNativeCertificateManagerTests(); 238 registerNativeCertificateManagerTests();
236 239
237 registerClearBrowsingDataTests(); 240 registerClearBrowsingDataTests();
238 }, 241 },
239 }; 242 };
240 }); 243 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_data.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698