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

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

Issue 2881193003: Add a button to chart-title to populate the test-picker. (Closed)
Patch Set: comments Created 3 years, 7 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
« no previous file with comments | « dashboard/dashboard/elements/report-page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/test-picker.html
diff --git a/dashboard/dashboard/elements/test-picker.html b/dashboard/dashboard/elements/test-picker.html
index 11f2751dd452b055b576538f5dbb3e3c03f37979..dbcc1d69db4e12fe4ab274e9627aeef1dfdc8133 100644
--- a/dashboard/dashboard/elements/test-picker.html
+++ b/dashboard/dashboard/elements/test-picker.html
@@ -482,6 +482,36 @@ found in the LICENSE file.
return this.currentSelectedPath_;
},
+ async setCurrentSelectedPath(testPath) {
+ this.updatingSubtestMenus = true;
+ for (let boxIndex = 0; boxIndex < testPath.length; ++boxIndex) {
+ const menu = this.getSelectionMenu(boxIndex);
+ const name = testPath[boxIndex];
+ let found = false;
+
+ for (const menuItem of menu.items) {
+ if (menuItem.name === name) {
+ found = true;
+ menu.selectedItem = menuItem;
+ break;
+ }
+ }
+
+ if (!found) {
+ this.updatingSubtestMenus = false;
+ throw new Error(`Invalid testPath ${testPath} @ ${boxIndex}`);
+ }
+
+ if (boxIndex == 0) {
+ this.updateTestSuiteDescription();
+ await this.updateBotMenu();
+ } else {
+ await this.updateSubtestMenus(boxIndex + 1);
+ }
+ }
+ this.updatingSubtestMenus = false;
+ },
+
getCurrentUnselected() {
return this.currentUnselectedTests_;
},
« no previous file with comments | « dashboard/dashboard/elements/report-page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698