| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 suite('<site-data>', function() { |
| 6 /** @type {SiteDataElement} */ |
| 7 var siteData; |
| 8 |
| 9 /** @type {TestSiteSettingsPrefsBrowserProxy} */ |
| 10 var testBrowserProxy; |
| 11 |
| 12 setup(function() { |
| 13 testBrowserProxy = new TestSiteSettingsPrefsBrowserProxy; |
| 14 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = testBrowserProxy; |
| 15 siteData = document.createElement('site-data'); |
| 16 }); |
| 17 |
| 18 test('tapping remove button (trash can) calls remove on origin', function() { |
| 19 var GOOGLE_ID = '1'; |
| 20 siteData.sites = [{site: 'Google', id: GOOGLE_ID, localData: 'Cookiez!'}]; |
| 21 Polymer.dom.flush(); |
| 22 |
| 23 MockInteractions.tap(siteData.$$('.remove-site')); |
| 24 |
| 25 return testBrowserProxy.whenCalled('removeCookie').then(function(path) { |
| 26 assertEquals(GOOGLE_ID, path); |
| 27 }); |
| 28 }); |
| 29 }); |
| OLD | NEW |