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

Side by Side Diff: build/android/pylib/results/presentation/test_results_presentation.py

Issue 2886323003: Remove importing CSS for results details page. (Closed)
Patch Set: black links 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/results/presentation/template/table.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # 2 #
3 # Copyright 2017 The Chromium Authors. All rights reserved. 3 # Copyright 2017 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import argparse 7 import argparse
8 import collections 8 import collections
9 import json 9 import json
10 import tempfile 10 import tempfile
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 def code_search(test, cs_base_url): 126 def code_search(test, cs_base_url):
127 """Returns URL for test on codesearch.""" 127 """Returns URL for test on codesearch."""
128 search = test.replace('#', '.') 128 search = test.replace('#', '.')
129 return '%s/?q=%s&type=cs' % (cs_base_url, search) 129 return '%s/?q=%s&type=cs' % (cs_base_url, search)
130 130
131 131
132 def status_class(status): 132 def status_class(status):
133 """Returns HTML class for test status.""" 133 """Returns HTML class for test status."""
134 if not status: 134 if not status:
135 return 'failure unknwon' 135 return 'failure unknown'
136 status = status.lower() 136 status = status.lower()
137 if status not in ('success', 'skipped'): 137 if status not in ('success', 'skipped'):
138 return 'failure %s' % status 138 return 'failure %s' % status
139 return status 139 return status
140 140
141 141
142 def create_test_table(results_dict, cs_base_url, suite_name): 142 def create_test_table(results_dict, cs_base_url, suite_name):
143 """Format test data for injecting into HTML table.""" 143 """Format test data for injecting into HTML table."""
144 144
145 header_row = [ 145 header_row = [
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 with open(json_file) as original_json_file: 426 with open(json_file) as original_json_file:
427 json_object = json.load(original_json_file) 427 json_object = json.load(original_json_file)
428 json_object['links'] = {'result_details': result_details_link} 428 json_object['links'] = {'result_details': result_details_link}
429 with open(args.output_json, 'w') as f: 429 with open(args.output_json, 'w') as f:
430 json.dump(json_object, f) 430 json.dump(json_object, f)
431 else: 431 else:
432 print result_details_link 432 print result_details_link
433 433
434 if __name__ == '__main__': 434 if __name__ == '__main__':
435 sys.exit(main()) 435 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/results/presentation/template/table.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698