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

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

Issue 2341493003: MD Settings: Deflake attempt for CrSettingsPrivacyPageTest.PrivacyPage. (Closed)
Patch Set: Check for specific value. 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 page = document.createElement('settings-privacy-page'); 98 page = document.createElement('settings-privacy-page');
99 document.body.appendChild(page); 99 document.body.appendChild(page);
100 }); 100 });
101 101
102 teardown(function() { page.remove(); }); 102 teardown(function() { page.remove(); });
103 103
104 test('showClearBrowsingDataDialog', function() { 104 test('showClearBrowsingDataDialog', function() {
105 assertFalse(!!page.$$('settings-clear-browsing-data-dialog')); 105 assertFalse(!!page.$$('settings-clear-browsing-data-dialog'));
106 MockInteractions.tap(page.$.clearBrowsingData); 106 MockInteractions.tap(page.$.clearBrowsingData);
107 Polymer.dom.flush(); 107 Polymer.dom.flush();
108 assertTrue(!!page.$$('settings-clear-browsing-data-dialog')); 108
109 var dialog = page.$$('settings-clear-browsing-data-dialog');
110 assertTrue(!!dialog);
111
112 // Ensure that the dialog is fully opened before returning from this
113 // test, otherwise asynchronous code run in attached() can cause flaky
114 // errors.
115 return test_util.whenAttributeIs(dialog.$.dialog, 'open', true);
109 }); 116 });
110 }); 117 });
111 } 118 }
112 119
113 function registerClearBrowsingDataTests() { 120 function registerClearBrowsingDataTests() {
114 suite('ClearBrowsingData', function() { 121 suite('ClearBrowsingData', function() {
115 /** @type {settings.TestClearBrowsingDataBrowserProxy} */ 122 /** @type {settings.TestClearBrowsingDataBrowserProxy} */
116 var testBrowserProxy; 123 var testBrowserProxy;
117 124
118 /** @type {SettingsClearBrowsingDataDialogElement} */ 125 /** @type {SettingsClearBrowsingDataDialogElement} */
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return { 259 return {
253 registerTests: function() { 260 registerTests: function() {
254 if (cr.isMac || cr.isWin) 261 if (cr.isMac || cr.isWin)
255 registerNativeCertificateManagerTests(); 262 registerNativeCertificateManagerTests();
256 263
257 registerClearBrowsingDataTests(); 264 registerClearBrowsingDataTests();
258 registerPrivacyPageTests(); 265 registerPrivacyPageTests();
259 }, 266 },
260 }; 267 };
261 }); 268 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/cr_settings_browsertest.js ('k') | chrome/test/data/webui/settings/test_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698