Commit e0b9ee64 authored by Haiyang Pan's avatar Haiyang Pan Committed by Commit Bot

android: Update the css/javascript for test_results_presentation.py

Changes including:
* Use the underline textDecoration for "a" element
* Update the code search link
* Remove redundant function setTableCellsAsClickable

Bug: 1041593
Change-Id: I30c45b5c054974a5e7544ece20a7958de570b16e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309754Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Haiyang Pan <hypan@google.com>
Cr-Commit-Position: refs/heads/master@{#790664}
parent 38cf60ed
...@@ -191,24 +191,3 @@ function sortByColumn(head) { ...@@ -191,24 +191,3 @@ function sortByColumn(head) {
function sortSuiteTableByFailedTestCases() { function sortSuiteTableByFailedTestCases() {
sortByColumn(document.getElementById('number_fail_tests')); sortByColumn(document.getElementById('number_fail_tests'));
} }
function setTableCellsAsClickable() {
const tableCells = document.getElementsByTagName('td');
for(let i = 0; i < tableCells.length; i++) {
const links = tableCells[i].getElementsByTagName('a');
// Only make the cell clickable if there is only one link.
if (links.length == 1) {
tableCells[i].addEventListener('click', function() {
links[0].click();
});
tableCells[i].addEventListener('mouseover', function() {
tableCells[i].style.cursor = 'pointer';
links[0].style.textDecoration = 'underline';
});
tableCells[i].addEventListener('mouseout', function() {
tableCells[i].style.cursor = 'initial';
links[0].style.textDecoration = 'initial';
});
}
}
}
...@@ -36,11 +36,8 @@ ...@@ -36,11 +36,8 @@
text-align: left; text-align: left;
} }
a { a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
cursor: pointer; cursor: pointer;
text-decoration: underline;
} }
a:link,a:visited,a:active { a:link,a:visited,a:active {
color: #444; color: #444;
...@@ -92,6 +89,5 @@ ...@@ -92,6 +89,5 @@
} }
); );
setBrowserBackButtonLogic(); setBrowserBackButtonLogic();
setTableCellsAsClickable();
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -131,7 +131,7 @@ def logs_cell(result, test_name, suite_name): ...@@ -131,7 +131,7 @@ def logs_cell(result, test_name, suite_name):
def code_search(test, cs_base_url): def code_search(test, cs_base_url):
"""Returns URL for test on codesearch.""" """Returns URL for test on codesearch."""
search = test.replace('#', '.') search = test.replace('#', '.')
return '%s/?q=%s&type=cs' % (cs_base_url, search) return '%s/search/?q=%s&type=cs' % (cs_base_url, search)
def status_class(status): def status_class(status):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment