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

Side by Side Diff: chrome/test/data/webui/settings/site_details_permission_tests.js

Issue 2190243002: [MD settings] update site details permission layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test fix Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_settings_behavior.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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-details. */ 5 /** @fileoverview Suite of tests for site-details. */
6 cr.define('site_details_permission', function() { 6 cr.define('site_details_permission', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('SiteDetailsPermission', function() { 8 suite('SiteDetailsPermission', function() {
9 /** 9 /**
10 * A site list element created before each test. 10 * A site list element created before each test.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 testElement.category = settings.ContentSettingsTypes.CAMERA; 86 testElement.category = settings.ContentSettingsTypes.CAMERA;
87 testElement.site = { 87 testElement.site = {
88 origin: origin, 88 origin: origin,
89 embeddingOrigin: '', 89 embeddingOrigin: '',
90 }; 90 };
91 91
92 return browserProxy.whenCalled('getExceptionList').then(function() { 92 return browserProxy.whenCalled('getExceptionList').then(function() {
93 assertFalse(testElement.$.details.hidden); 93 assertFalse(testElement.$.details.hidden);
94 94
95 var header = testElement.$.details.querySelector( 95 var header = testElement.$.details.querySelector(
96 '.permission-header'); 96 '#permissionHeader');
97 assertEquals('Camera', header.innerText.trim(), 97 assertEquals('Camera', header.innerText.trim(),
98 'Widget should be labelled correctly'); 98 'Widget should be labelled correctly');
99 99
100 // Flip the permission and validate that prefs stay in sync. 100 // Flip the permission and validate that prefs stay in sync.
101 return validatePermissionFlipWorks(origin, true); 101 return validatePermissionFlipWorks(origin, true);
102 }).then(function() { 102 }).then(function() {
103 browserProxy.resetResolver('setCategoryPermissionForOrigin'); 103 browserProxy.resetResolver('setCategoryPermissionForOrigin');
104 return validatePermissionFlipWorks(origin, false); 104 return validatePermissionFlipWorks(origin, false);
105 }).then(function() { 105 }).then(function() {
106 browserProxy.resetResolver('setCategoryPermissionForOrigin'); 106 browserProxy.resetResolver('setCategoryPermissionForOrigin');
(...skipping 18 matching lines...) Expand all
125 }).then(function() { 125 }).then(function() {
126 assertTrue(testElement.$.details.hidden); 126 assertTrue(testElement.$.details.hidden);
127 }); 127 });
128 }); 128 });
129 }); 129 });
130 } 130 }
131 return { 131 return {
132 registerTests: registerTests, 132 registerTests: registerTests,
133 }; 133 };
134 }); 134 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_settings_behavior.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698