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

Unified Diff: chrome/test/data/webui/settings/privacy_page_test.js

Issue 2133893002: [MD settings] disable clear browsing data while it is running (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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
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 106e361f9568aa6d275624b792d8c3e87879c51a..7109cfafaab74ea999b66cc77392cfe9d2ee7b68 100644
--- a/chrome/test/data/webui/settings/privacy_page_test.js
+++ b/chrome/test/data/webui/settings/privacy_page_test.js
@@ -52,6 +52,7 @@ cr.define('settings_privacy_page', function() {
/** @override */
clearBrowsingData: function() {
this.methodCalled('clearBrowsingData');
+ cr.webUIListenerCallback('browsing-data-removing', true);
return this.clearBrowsingDataPromise_ !== null ?
this.clearBrowsingDataPromise_ : Promise.resolve();
},
@@ -59,6 +60,7 @@ cr.define('settings_privacy_page', function() {
/** @override */
initialize: function() {
this.methodCalled('initialize');
+ return Promise.resolve(false);
},
};
@@ -105,6 +107,7 @@ cr.define('settings_privacy_page', function() {
PolymerTest.clearBody();
element = document.createElement('settings-clear-browsing-data-dialog');
document.body.appendChild(element);
+ return testBrowserProxy.whenCalled('initialize');
});
teardown(function() { element.remove(); });
@@ -136,6 +139,7 @@ cr.define('settings_privacy_page', function() {
// Simulate signal from browser indicating that clearing has
// completed.
+ cr.webUIListenerCallback('browsing-data-removing', false);
promiseResolver.resolve();
// Yields to the message loop to allow the callback chain of the
// Promise that was just resolved to execute before the

Powered by Google App Engine
This is Rietveld 408576698