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

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

Issue 2593503004: [MD settings] remove action menu from all-sites (Closed)
Patch Set: unit test Created 3 years, 12 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_list.js ('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-list. */ 5 /** @fileoverview Suite of tests for site-list. */
6 cr.define('site_list', function() { 6 cr.define('site_list', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('SiteList', function() { 8 suite('SiteList', function() {
9 /** 9 /**
10 * A site list element created before each test. 10 * A site list element created before each test.
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 setUpCategory(settings.ContentSettingsTypes.GEOLOCATION, 702 setUpCategory(settings.ContentSettingsTypes.GEOLOCATION,
703 settings.PermissionValues.ALLOW, prefsOneDisabled); 703 settings.PermissionValues.ALLOW, prefsOneDisabled);
704 return browserProxy.whenCalled('getExceptionList').then( 704 return browserProxy.whenCalled('getExceptionList').then(
705 function(contentType) { 705 function(contentType) {
706 assertEquals( 706 assertEquals(
707 settings.ContentSettingsTypes.GEOLOCATION, contentType); 707 settings.ContentSettingsTypes.GEOLOCATION, contentType);
708 assertFalse(testElement.$.category.hidden); 708 assertFalse(testElement.$.category.hidden);
709 }); 709 });
710 }); 710 });
711 711
712 test('All sites category no action menu', function() {
713 setUpCategory(settings.ALL_SITES, '', prefsVarious);
714 return browserProxy.whenCalled('getExceptionList').then(
715 function(contentType) {
716 // Use resolver to ensure asserts bubble up to the framework with
717 // meaningful errors.
718 var resolver = new PromiseResolver();
719 testElement.async(resolver.resolve);
720 return resolver.promise.then(function() {
dschuyler 2016/12/21 02:06:47 I'm including this promise resolve because other t
dpapad 2016/12/21 02:32:13 The comment is a bit misleading (or I am misunders
dschuyler 2016/12/21 02:39:39 Thanks for looking at that with me. Knowing when P
721 var item = testElement.$.listContainer.children[0];
722 var dots = item.querySelector('paper-icon-button');
723 assertTrue(!!dots);
724 assertTrue(dots.hidden);
725 });
726 });
727 });
728
712 test('All sites category', function() { 729 test('All sites category', function() {
713 // Prefs: Multiple and overlapping sites. 730 // Prefs: Multiple and overlapping sites.
714 setUpCategory(settings.ALL_SITES, '', prefsVarious); 731 setUpCategory(settings.ALL_SITES, '', prefsVarious);
715 732
716 return browserProxy.whenCalled('getExceptionList').then( 733 return browserProxy.whenCalled('getExceptionList').then(
717 function(contentType) { 734 function(contentType) {
718 // Use resolver to ensure asserts bubble up to the framework with 735 // Use resolver to ensure asserts bubble up to the framework with
719 // meaningful errors. 736 // meaningful errors.
720 var resolver = new PromiseResolver(); 737 var resolver = new PromiseResolver();
721 testElement.async(resolver.resolve); 738 testElement.async(resolver.resolve);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); 868 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]);
852 assertEquals('allow', args[3]); 869 assertEquals('allow', args[3]);
853 }); 870 });
854 }); 871 });
855 }); 872 });
856 } 873 }
857 return { 874 return {
858 registerTests: registerTests, 875 registerTests: registerTests,
859 }; 876 };
860 }); 877 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698