summaryrefslogtreecommitdiffstats
path: root/tools/code_coverage
diff options
context:
space:
mode:
authorpshenoy@chromium.org <pshenoy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 01:41:27 +0000
committerpshenoy@chromium.org <pshenoy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 01:41:27 +0000
commit4afd5fcaf2a2881dc58ff9fa19f070e16fc7f811 (patch)
treed2be15862724b3fd7ed76649b9fddd10d60abb2d /tools/code_coverage
parent3076b7fb8bfc472f5a8fabbacbc4e9d4321994ce (diff)
downloadchromium_src-4afd5fcaf2a2881dc58ff9fa19f070e16fc7f811.zip
chromium_src-4afd5fcaf2a2881dc58ff9fa19f070e16fc7f811.tar.gz
chromium_src-4afd5fcaf2a2881dc58ff9fa19f070e16fc7f811.tar.bz2
Empty <table> tag is written if there are no dirctories or no files. This was causing the following table after the empty table not to have sorting functionality. Fixed by including writing <table> tag inside 'if' statement.
Review URL: https://chromiumcodereview.appspot.com/10736054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/code_coverage')
-rw-r--r--tools/code_coverage/croc_html.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/code_coverage/croc_html.py b/tools/code_coverage/croc_html.py
index 248529c..7866f47 100644
--- a/tools/code_coverage/croc_html.py
+++ b/tools/code_coverage/croc_html.py
@@ -378,20 +378,20 @@ class CrocHtml(object):
for group in sorted(cov_dir.stats_by_group):
self.AddItem(table, group, cov_dir.stats_by_group[group], None)
- table = body.E('table', e_class='sortable')
- table.E('h3').Text('Subdirectories')
# List subdirs
if cov_dir.subdirs:
+ table = body.E('table', e_class='sortable')
+ table.E('h3').Text('Subdirectories')
self.AddSectionHeader(table, None, 'Subdirectory')
for d in sorted(cov_dir.subdirs):
self.AddItem(table, d + '/', cov_dir.subdirs[d].stats_by_group['all'],
None, link=d + '/index.html')
- table = body.E('table', e_class='sortable')
- table.E('h3').Text('Files in This Directory')
# List files
if cov_dir.files:
+ table = body.E('table', e_class='sortable')
+ table.E('h3').Text('Files in This Directory')
self.AddSectionHeader(table, None, 'Filename',
is_file=True)