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

Unified Diff: dashboard/dashboard/elements/test-picker-test.html

Issue 2767433002: Start using /list_tests to populate subtest menus in test-picker (Closed)
Patch Set: done Created 3 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 side-by-side diff with in-line comments
Download patch
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 bcfc477f91138a5440a03c2c4d1c1bfbecfee25d..141fb9c9557ed24ef65fff05a5ac2fc657a486ce 100644
--- a/dashboard/dashboard/elements/test-picker-test.html
+++ b/dashboard/dashboard/elements/test-picker-test.html
@@ -110,7 +110,6 @@ tr.b.unittest.testSuite(function() {
}, testOptions);
test('fullPathRetained', function() {
- testing_common.addXhrMock('*', JSON.stringify(MOCK_RESPONSE));
let testPicker = document.createElement('test-picker');
testPicker.testSuites = {
'endure': {
@@ -125,12 +124,18 @@ tr.b.unittest.testSuite(function() {
'mon': ['select-multiple-add/select-multiple-add.html']
}
};
+ testPicker.subtests.prepopulate({
+ 'Chromium/mac/blink_perf': ['Chromium/mac/blink_perf/textarea-edit'],
+ 'Chromium/mac/blink_perf/textarea-edit': [
+ 'Chromium/mac/blink_perf/textarea_edit.html']
+ });
let suiteMenu = testPicker.getSelectionMenu(0);
suiteMenu.selectedItem = suiteMenu.items[0];
let botMenu = testPicker.getSelectionMenu(1);
- botMenu.selectedItem = botMenu.items[0];
+ // Pick the second bot menu item because the first is the master.
+ botMenu.selectedItem = botMenu.items[1];
eakuefner 2017/04/13 23:26:03 The problem with this is, mutating selectedItem li
sullivan 2017/04/14 00:37:30 2 things: 1) I think it's okay to expicitly call
eakuefner 2017/04/14 17:34:26 Done.
let benchmarkMenu = testPicker.getSelectionMenu(2);
let expectedBenchmark = benchmarkMenu.items[0].name;
@@ -147,8 +152,7 @@ tr.b.unittest.testSuite(function() {
assert.deepEqual(metricMenu.selectedItem.name, expectedMetric);
}, testOptions);
- test('getCurrentSelectionReturnsNullIfInvalid', async function() {
- testing_common.addXhrMock('*', JSON.stringify(MOCK_RESPONSE));
+ test('getCurrentSelectionReturnsUndefinedIfInvalid', async function() {
let testPicker = document.createElement('test-picker');
testPicker.testSuites = {
'endure': {
@@ -170,8 +174,7 @@ tr.b.unittest.testSuite(function() {
let botMenu = testPicker.getSelectionMenu(1);
botMenu.selectedItem = botMenu.items[0];
- assert.isNull(await testPicker.getCurrentSelection());
- testing_common.clearXhrMock();
+ assert.isUndefined(await testPicker.getCurrentSelection());
});
});
</script>

Powered by Google App Engine
This is Rietveld 408576698