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

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

Issue 2686063004: MD Settings: make blowing away per-origin data (i.e. cookies) easier (Closed)
Patch Set: dschuyler@ review Created 3 years, 10 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/site_data_test.js
diff --git a/chrome/test/data/webui/settings/site_data_test.js b/chrome/test/data/webui/settings/site_data_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..bc6d9599a50b171a48da9588210f1e6358a43bd1
--- /dev/null
+++ b/chrome/test/data/webui/settings/site_data_test.js
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+suite('<site-data>', function() {
+ /** @type {SiteDataElement} */
+ var siteData;
+
+ /** @type {TestSiteSettingsPrefsBrowserProxy} */
+ var testBrowserProxy;
+
+ setup(function() {
+ testBrowserProxy = new TestSiteSettingsPrefsBrowserProxy;
+ settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = testBrowserProxy;
+ siteData = document.createElement('site-data');
+ });
+
+ test('tapping remove button (trash can) calls remove on origin', function() {
+ var GOOGLE_ID = '1';
+ siteData.sites = [{site: 'Google', id: GOOGLE_ID, localData: 'Cookiez!'}];
+ Polymer.dom.flush();
+
+ MockInteractions.tap(siteData.$$('.remove-site'));
+
+ return testBrowserProxy.whenCalled('removeCookie').then(function(path) {
+ assertEquals(GOOGLE_ID, path);
+ });
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698