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

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: Fix 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/test/data/webui/settings/cr_settings_browsertest.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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 /** @type {SettingsPrivacyPageElement} */ 94 /** @type {SettingsPrivacyPageElement} */
95 var page; 95 var page;
96 96
97 setup(function() { 97 setup(function() {
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(done) {
105 // Ensure that the dialog is fully opened before returning from this
106 // test, otherwise asynchronous code run in attached() can cause flaky
107 // errors.
108 page.addEventListener(
109 'clear-browsing-data-dialog-opened', function() {
Dan Beam 2016/09/14 01:15:58 can we just use 'show' instead of making this even
dpapad 2016/09/15 16:56:17 Do you mean use show() instead of showModal() to d
Dan Beam 2016/09/15 17:11:06 i thought, for some reason, that a 'show' event wa
dpapad 2016/09/15 17:58:22 I followed similar approach, but I did not add it
110 assertTrue(page.$$(
111 'settings-clear-browsing-data-dialog').$.dialog.open);
112 done();
113 });
114
105 assertFalse(!!page.$$('settings-clear-browsing-data-dialog')); 115 assertFalse(!!page.$$('settings-clear-browsing-data-dialog'));
106 MockInteractions.tap(page.$.clearBrowsingData); 116 MockInteractions.tap(page.$.clearBrowsingData);
107 Polymer.dom.flush(); 117 Polymer.dom.flush();
108 assertTrue(!!page.$$('settings-clear-browsing-data-dialog')); 118 assertTrue(!!page.$$('settings-clear-browsing-data-dialog'));
109 }); 119 });
110 }); 120 });
111 } 121 }
112 122
113 function registerClearBrowsingDataTests() { 123 function registerClearBrowsingDataTests() {
114 suite('ClearBrowsingData', function() { 124 suite('ClearBrowsingData', function() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return { 262 return {
253 registerTests: function() { 263 registerTests: function() {
254 if (cr.isMac || cr.isWin) 264 if (cr.isMac || cr.isWin)
255 registerNativeCertificateManagerTests(); 265 registerNativeCertificateManagerTests();
256 266
257 registerClearBrowsingDataTests(); 267 registerClearBrowsingDataTests();
258 registerPrivacyPageTests(); 268 registerPrivacyPageTests();
259 }, 269 },
260 }; 270 };
261 }); 271 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/cr_settings_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698