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

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

Issue 1891963002: MD Settings: Replace paper-menu with paper-listbox in a few places. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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_details_permission.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 settings-dropdown-menu. */ 5 /** @fileoverview Suite of tests for settings-dropdown-menu. */
6 cr.define('settings_dropdown_menu', function() { 6 cr.define('settings_dropdown_menu', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('SettingsDropdownMenu', function() { 8 suite('SettingsDropdownMenu', function() {
9 // Import settings_dropdown_menu.html before running suite. 9 // Import settings_dropdown_menu.html before running suite.
10 suiteSetup(function() { 10 suiteSetup(function() {
11 return Promise.all([ 11 return Promise.all([
12 PolymerTest.importHtml('chrome://md-settings/i18n_setup.html'), 12 PolymerTest.importHtml('chrome://md-settings/i18n_setup.html'),
13 PolymerTest.importHtml( 13 PolymerTest.importHtml(
14 'chrome://md-settings/controls/settings_dropdown_menu.html'), 14 'chrome://md-settings/controls/settings_dropdown_menu.html'),
15 ]); 15 ]);
16 }); 16 });
17 17
18 /** @type {SettingsDropdownMenu} */ 18 /** @type {SettingsDropdownMenu} */
19 var dropdown; 19 var dropdown;
20 20
21 /** 21 /**
22 * The IronSelectable (paper-menu) used internally by the dropdown menu. 22 * The IronSelectable (paper-listbox) used internally by the dropdown
23 * menu.
23 * @type {Polymer.IronSelectableBehavior} 24 * @type {Polymer.IronSelectableBehavior}
24 */ 25 */
25 var selectable; 26 var selectable;
26 27
27 setup(function() { 28 setup(function() {
28 PolymerTest.clearBody(); 29 PolymerTest.clearBody();
29 dropdown = document.createElement('settings-dropdown-menu'); 30 dropdown = document.createElement('settings-dropdown-menu');
30 selectable = dropdown.$$('paper-menu'); 31 selectable = dropdown.$$('paper-listbox');
31 document.body.appendChild(dropdown); 32 document.body.appendChild(dropdown);
32 }); 33 });
33 34
34 test('with number options', function testNumberOptions() { 35 test('with number options', function testNumberOptions() {
35 dropdown.pref = { 36 dropdown.pref = {
36 key: 'test.number', 37 key: 'test.number',
37 type: chrome.settingsPrivate.PrefType.NUMBER, 38 type: chrome.settingsPrivate.PrefType.NUMBER,
38 value: 100, 39 value: 100,
39 }; 40 };
40 dropdown.menuOptions = [{value: 100, name: 'Option 100'}, 41 dropdown.menuOptions = [{value: 100, name: 'Option 100'},
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Pref should not have changed. 101 // Pref should not have changed.
101 assertEquals('f', dropdown.pref.value); 102 assertEquals('f', dropdown.pref.value);
102 }); 103 });
103 }); 104 });
104 } 105 }
105 106
106 return { 107 return {
107 registerTests: registerTests, 108 registerTests: registerTests,
108 }; 109 };
109 }); 110 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_details_permission.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698