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

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

Issue 2754563002: MD Settings: Lazy load the contents of the "advanced" settings. (Closed)
Patch Set: Address comments. 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
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 Runs the Polymer Password Settings tests. */ 5 /** @fileoverview Runs the Polymer Password Settings tests. */
6 6
7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 // Polymer BrowserTest fixture. 10 // Polymer BrowserTest fixture.
(...skipping 11 matching lines...) Expand all
22 function SettingsPasswordSectionBrowserTest() {} 22 function SettingsPasswordSectionBrowserTest() {}
23 23
24 SettingsPasswordSectionBrowserTest.prototype = { 24 SettingsPasswordSectionBrowserTest.prototype = {
25 __proto__: PolymerTest.prototype, 25 __proto__: PolymerTest.prototype,
26 26
27 /** @override */ 27 /** @override */
28 browsePreload: 28 browsePreload:
29 'chrome://md-settings/passwords_and_forms_page/passwords_section.html', 29 'chrome://md-settings/passwords_and_forms_page/passwords_section.html',
30 30
31 /** @override */ 31 /** @override */
32 extraLibraries: PolymerTest.getLibraries(ROOT_PATH), 32 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
33 'ensure_lazy_loaded.js',
34 ]),
33 35
34 /** @override */ 36 /** @override */
35 setUp: function() { 37 setUp: function() {
36 PolymerTest.prototype.setUp.call(this); 38 PolymerTest.prototype.setUp.call(this);
37 // Test is run on an individual element that won't have a page language. 39 // Test is run on an individual element that won't have a page language.
38 this.accessibilityAuditConfig.auditRulesToIgnore.push('humanLangMissing'); 40 this.accessibilityAuditConfig.auditRulesToIgnore.push('humanLangMissing');
41
42 settings.ensureLazyLoaded();
39 }, 43 },
40
41 }; 44 };
42 45
43 /** This test will validate that the section is loaded with data. */ 46 /** This test will validate that the section is loaded with data. */
44 TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() { 47 TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
45 /** 48 /**
46 * Helper method that validates a that elements in the password list match 49 * Helper method that validates a that elements in the password list match
47 * the expected data. 50 * the expected data.
48 * @param {!Element} listElement The iron-list element that will be checked. 51 * @param {!Element} listElement The iron-list element that will be checked.
49 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList The 52 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList The
50 * expected data. 53 * expected data.
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 assertEquals(item.loginPair.username, event.detail.username); 459 assertEquals(item.loginPair.username, event.detail.username);
457 done(); 460 done();
458 }); 461 });
459 462
460 MockInteractions.tap(passwordDialog.$.showPasswordButton); 463 MockInteractions.tap(passwordDialog.$.showPasswordButton);
461 }); 464 });
462 }); 465 });
463 466
464 mocha.run(); 467 mocha.run();
465 }); 468 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698