Chromium Code Reviews| Index: chrome/test/data/webui/settings/dropdown_menu_tests.js |
| diff --git a/chrome/test/data/webui/settings/dropdown_menu_tests.js b/chrome/test/data/webui/settings/dropdown_menu_tests.js |
| index 77c3768ded422a0a4a0752bf58fe4f5f3ec5307a..1bb7576e4e9a975a7e840a540fe5b396751fc0c3 100644 |
| --- a/chrome/test/data/webui/settings/dropdown_menu_tests.js |
| +++ b/chrome/test/data/webui/settings/dropdown_menu_tests.js |
| @@ -92,6 +92,32 @@ cr.define('settings_dropdown_menu', function() { |
| // Pref should not have changed. |
| assertEquals('f', dropdown.pref.value); |
| }); |
| + |
| + test('delay setting options', function testDelayedOptions(done) { |
| + dropdown.pref = { |
| + key: 'test.number2', |
| + type: chrome.settingsPrivate.PrefType.NUMBER, |
| + value: 200, |
| + }; |
| + |
| + setTimeout(function() { |
|
dschuyler
2016/08/11 23:50:58
What other choices do we have aside from using
a s
michaelpg
2016/08/16 23:38:11
In this case the point of the test is to spin for
dschuyler
2016/08/17 23:59:46
Ah, I think I was hoping for a different kind of t
michaelpg
2016/08/19 00:41:23
Yes, that's what this tests: without setting menuO
|
| + assertEquals( |
| + loadTimeData.getValue('loading'), dropdown.$.dropdownMenu.label); |
| + assertTrue(dropdown.$.dropdownMenu.disabled); |
| + assertEquals(undefined, selectable.selected); |
| + |
| + dropdown.menuOptions = [{value: 100, name: 'Option 100'}, |
| + {value: 200, name: 'Option 200'}, |
| + {value: 300, name: 'Option 300'}, |
| + {value: 400, name: 'Option 400'}]; |
| + Polymer.dom.flush(); |
| + |
| + // Dropdown menu enables itself. |
| + assertFalse(dropdown.$.dropdownMenu.disabled); |
| + assertEquals(200, dropdown.pref.value); |
|
dschuyler
2016/08/11 23:50:58
Consider making a comment in the code about
what t
michaelpg
2016/08/16 23:38:10
Done, also this probably wasn't the right thing to
|
| + done(); |
| + }, 100); |
| + }); |
| }); |
| } |