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

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

Issue 2739693002: MD Settings: Close action menu when opening edit cookie exception dialog. (Closed)
Patch Set: Add test assertion. Created 3 years, 9 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 /** 7 /**
8 * An example pref with 2 blocked location items and 2 allowed. This pref 8 * An example pref with 2 blocked location items and 2 allowed. This pref
9 * is also used for the All Sites category and therefore needs values for 9 * is also used for the All Sites category and therefore needs values for
10 * all types, even though some might be blank. 10 * all types, even though some might be blank.
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 setUpCategory( 626 setUpCategory(
627 settings.ContentSettingsTypes.COOKIES, 627 settings.ContentSettingsTypes.COOKIES,
628 settings.PermissionValues.SESSION_ONLY, 628 settings.PermissionValues.SESSION_ONLY,
629 prefsSessionOnly); 629 prefsSessionOnly);
630 630
631 return browserProxy.whenCalled('getExceptionList').then(function() { 631 return browserProxy.whenCalled('getExceptionList').then(function() {
632 Polymer.dom.flush(); // Populates action menu. 632 Polymer.dom.flush(); // Populates action menu.
633 633
634 openActionMenu(0); 634 openActionMenu(0);
635 assertMenu(['Allow', 'Block', 'Edit', 'Remove'], testElement); 635 assertMenu(['Allow', 'Block', 'Edit', 'Remove'], testElement);
636 var menu = testElement.$$('dialog[is=cr-action-menu]');
637 assertTrue(menu.open);
636 var edit = testElement.$.edit; 638 var edit = testElement.$.edit;
637 assertTrue(!!edit); 639 assertTrue(!!edit);
638 MockInteractions.tap(edit); 640 MockInteractions.tap(edit);
639 Polymer.dom.flush(); 641 Polymer.dom.flush();
642 assertFalse(menu.open);
640 643
641 assertTrue(!!testElement.$$('settings-edit-exception-dialog')); 644 assertTrue(!!testElement.$$('settings-edit-exception-dialog'));
642 }); 645 });
643 }); 646 });
644 647
645 test('list items shown and clickable when data is present', function() { 648 test('list items shown and clickable when data is present', function() {
646 var contentType = settings.ContentSettingsTypes.GEOLOCATION; 649 var contentType = settings.ContentSettingsTypes.GEOLOCATION;
647 setUpCategory(contentType, settings.PermissionValues.ALLOW, prefs); 650 setUpCategory(contentType, settings.PermissionValues.ALLOW, prefs);
648 return browserProxy.whenCalled('getExceptionList').then( 651 return browserProxy.whenCalled('getExceptionList').then(
649 function(actualContentType) { 652 function(actualContentType) {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 982
980 assertFalse(dialog.$.dialog.open); 983 assertFalse(dialog.$.dialog.open);
981 }); 984 });
982 }); 985 });
983 }); 986 });
984 987
985 return { 988 return {
986 registerTests: registerTests, 989 registerTests: registerTests,
987 }; 990 };
988 }); 991 });
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