| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 /** @fileoverview Suite of tests for site-data-details-subpage. */ | 5 /** @fileoverview Suite of tests for site-data-details-subpage. */ |
| 6 suite('SiteDataDetailsSubpage', function() { | 6 suite('SiteDataDetailsSubpage', function() { |
| 7 /** @type {?SiteDataDetailsSubpageElement} */ | 7 /** @type {?SiteDataDetailsSubpageElement} */ |
| 8 var page = null; | 8 var page = null; |
| 9 | 9 |
| 10 /** @type {TestSiteSettingsPrefsBrowserProxy} */ | 10 /** @type {TestSiteSettingsPrefsBrowserProxy} */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 var site = 'foo.com'; | 35 var site = 'foo.com'; |
| 36 | 36 |
| 37 setup(function() { | 37 setup(function() { |
| 38 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); | 38 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); |
| 39 browserProxy.setCookieDetails(cookieList); | 39 browserProxy.setCookieDetails(cookieList); |
| 40 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; | 40 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; |
| 41 PolymerTest.clearBody(); | 41 PolymerTest.clearBody(); |
| 42 page = document.createElement('site-data-details-subpage'); | 42 page = document.createElement('site-data-details-subpage'); |
| 43 settings.navigateTo( | 43 settings.navigateTo( |
| 44 settings.Route.SITE_SETTINGS_DATA_DETAILS, | 44 settings.routes.SITE_SETTINGS_DATA_DETAILS, |
| 45 new URLSearchParams('site=' + site)); | 45 new URLSearchParams('site=' + site)); |
| 46 | 46 |
| 47 document.body.appendChild(page); | 47 document.body.appendChild(page); |
| 48 }); | 48 }); |
| 49 | 49 |
| 50 teardown(function() { | 50 teardown(function() { |
| 51 settings.resetRouteForTesting(); | 51 settings.resetRouteForTesting(); |
| 52 }); | 52 }); |
| 53 | 53 |
| 54 test('DetailsShownForCookie', function() { | 54 test('DetailsShownForCookie', function() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 // Check that all the cookie information is presented in the DOM. | 69 // Check that all the cookie information is presented in the DOM. |
| 70 var cookieDetailValues = page.root.querySelectorAll('.secondary'); | 70 var cookieDetailValues = page.root.querySelectorAll('.secondary'); |
| 71 cookieDetailValues.forEach(function(div, i) { | 71 cookieDetailValues.forEach(function(div, i) { |
| 72 var key = cookieInfo.cookie[i][0]; | 72 var key = cookieInfo.cookie[i][0]; |
| 73 assertEquals(cookieDetails[key], div.textContent); | 73 assertEquals(cookieDetails[key], div.textContent); |
| 74 }); | 74 }); |
| 75 }); | 75 }); |
| 76 }); | 76 }); |
| 77 }); | 77 }); |
| OLD | NEW |