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

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

Issue 2687553003: MD Settings: Fix site data details regression and add test. (Closed)
Patch Set: Address comments. Created 3 years, 10 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
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 setup(function() { 337 setup(function() {
338 browserProxy = new TestSiteSettingsPrefsBrowserProxy(); 338 browserProxy = new TestSiteSettingsPrefsBrowserProxy();
339 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; 339 settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
340 PolymerTest.clearBody(); 340 PolymerTest.clearBody();
341 testElement = document.createElement('site-list'); 341 testElement = document.createElement('site-list');
342 document.body.appendChild(testElement); 342 document.body.appendChild(testElement);
343 }); 343 });
344 344
345 teardown(function() { 345 teardown(function() {
346 closeActionMenu(); 346 closeActionMenu();
347 // The code being tested changes the URL. Reset so that URL state is not
348 // leaked across tests.
349 settings.navigateTo(settings.Route.BASIC);
tommycli 2017/02/08 22:04:17 well technically it's the internal route variable
dpapad 2017/02/08 22:16:42 I see. In that case, how about calling resetRouteF
347 }); 350 });
348 351
349 /** 352 /**
350 * Fetch the non-hidden menu items from the action menu. 353 * Fetch the non-hidden menu items from the action menu.
351 */ 354 */
352 function getMenuItems() { 355 function getMenuItems() {
353 var menu = testElement.$$('dialog[is=cr-action-menu]'); 356 var menu = testElement.$$('dialog[is=cr-action-menu]');
354 assertTrue(!!menu); 357 assertTrue(!!menu);
355 return menu.querySelectorAll('button:not([hidden])'); 358 return menu.querySelectorAll('button:not([hidden])');
356 } 359 }
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]); 886 assertEquals(settings.ContentSettingsTypes.JAVASCRIPT, args[2]);
884 assertEquals('allow', args[3]); 887 assertEquals('allow', args[3]);
885 }); 888 });
886 }); 889 });
887 }); 890 });
888 } 891 }
889 return { 892 return {
890 registerTests: registerTests, 893 registerTests: registerTests,
891 }; 894 };
892 }); 895 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698