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

Unified Diff: build/android/pylib/results/presentation/javascript/main_html.js

Issue 2799153008: Add back buttons and load new 'pages' by calling javascript. (Closed)
Patch Set: remove obsolete functions 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: build/android/pylib/results/presentation/javascript/main_html.js
diff --git a/build/android/pylib/results/presentation/javascript/main_html.js b/build/android/pylib/results/presentation/javascript/main_html.js
index 6c254d5a6885ffdae66f9422161f0a9ebc031954..71f22b7094e053c97205ac7e47441bd07429a251 100644
--- a/build/android/pylib/results/presentation/javascript/main_html.js
+++ b/build/android/pylib/results/presentation/javascript/main_html.js
@@ -26,6 +26,18 @@ function showTestTable(show_the_table) {
show_the_table ? 'table' : 'none');
}
+function showBackButtons(show_buttons) {
+ buttons = document.getElementsByClassName('back_button')
+ Array.prototype.slice.call(buttons)
+ .forEach(function(button) {
+ if (!show_buttons) {
+ button.style.display = 'none';
+ } else {
+ button.style.display = 'inline';
+ }
+ });
+}
+
function showTestsOfOneSuiteOnly(suite_name) {
setTitle('Test Results of Suite: ' + suite_name)
show_all = (suite_name == 'TOTAL')
@@ -46,12 +58,16 @@ function showTestsOfOneSuiteOnly(suite_name) {
});
showTestTable(true);
showSuiteTable(false);
+ showBackButtons(true);
+ window.scrollTo(0, 0);
}
function showSuiteTableOnly() {
setTitle('Suites Summary')
showTestTable(false);
showSuiteTable(true);
+ showBackButtons(false);
+ window.scrollTo(0, 0);
}
function setTitle(title) {
@@ -166,17 +182,6 @@ function sortByColumn(head) {
}
}
-function loadPage() {
- var args = getArguments();
- if ('suite' in args) {
- // The user wants to visit detailed 'subpage' of that suite.
- showTestsOfOneSuiteOnly(args['suite']);
- } else {
- // The user wants to visit the summary of all suites.
- showSuiteTableOnly();
- }
-}
-
function reportIssues() {
var url = 'https://bugs.chromium.org/p/chromium/issues/entry?' +
'labels=Pri-2,Type-Bug,Restrict-View-Google&' +

Powered by Google App Engine
This is Rietveld 408576698