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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/privacy_page_test.js
diff --git a/chrome/test/data/webui/settings/privacy_page_test.js b/chrome/test/data/webui/settings/privacy_page_test.js
index c42bbe0f9ba0a1f3d96285ec1cd70d4c7d0ddebd..f317e13c415e53ef5bcaef4dcc7c75887f84d27c 100644
--- a/chrome/test/data/webui/settings/privacy_page_test.js
+++ b/chrome/test/data/webui/settings/privacy_page_test.js
@@ -101,7 +101,17 @@ cr.define('settings_privacy_page', function() {
teardown(function() { page.remove(); });
- test('showClearBrowsingDataDialog', function() {
+ test('showClearBrowsingDataDialog', function(done) {
+ // Ensure that the dialog is fully opened before returning from this
+ // test, otherwise asynchronous code run in attached() can cause flaky
+ // errors.
+ page.addEventListener(
+ '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
+ assertTrue(page.$$(
+ 'settings-clear-browsing-data-dialog').$.dialog.open);
+ done();
+ });
+
assertFalse(!!page.$$('settings-clear-browsing-data-dialog'));
MockInteractions.tap(page.$.clearBrowsingData);
Polymer.dom.flush();
« 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