| Index: dashboard/dashboard/elements/test-picker-test.html
|
| diff --git a/dashboard/dashboard/elements/test-picker-test.html b/dashboard/dashboard/elements/test-picker-test.html
|
| index 60596fb413c4703a5518ca7e4147c4d883abfd14..e663c116f6842d32a3eae6eac77763e3a5a1613e 100644
|
| --- a/dashboard/dashboard/elements/test-picker-test.html
|
| +++ b/dashboard/dashboard/elements/test-picker-test.html
|
| @@ -146,5 +146,32 @@ tr.b.unittest.testSuite(function() {
|
| assert.deepEqual(benchmarkMenu.selectedItem.name, expectedBenchmark);
|
| assert.deepEqual(metricMenu.selectedItem.name, expectedMetric);
|
| }, testOptions);
|
| +
|
| + test('getCurrentSelectionReturnsNullIfInvalid', function() {
|
| + testing_common.addXhrMock('*', JSON.stringify(MOCK_RESPONSE));
|
| + let testPicker = document.createElement('test-picker');
|
| + testPicker.testSuites = {
|
| + 'endure': {
|
| + 'mas': {'Chromium': {'mac': false, 'win7': true}},
|
| + 'dep': true
|
| + },
|
| + 'dromaeo': {
|
| + 'mas': {'Chromium': {'mac': false, 'win7': false}}
|
| + },
|
| + 'blink_perf': {
|
| + 'mas': {'Chromium': {'mac': false, 'win7': false}},
|
| + 'mon': ['select-multiple-add/select-multiple-add.html']
|
| + }
|
| + };
|
| +
|
| + let suiteMenu = testPicker.getSelectionMenu(0);
|
| + suiteMenu.selectedItem = suiteMenu.items[0];
|
| +
|
| + let botMenu = testPicker.getSelectionMenu(1);
|
| + botMenu.selectedItem = botMenu.items[0];
|
| +
|
| + assert.isNull(testPicker.getCurrentSelection());
|
| + testing_common.clearXhrMock();
|
| + });
|
| });
|
| </script>
|
|
|