Bug 1287019 - part2: prevent saving redundant screenshots in mozlog's HTML format result. draft
authorJeremy Chen <jeremychen@mozilla.com>
Mon, 18 Jul 2016 13:53:58 +0800
changeset 388836 f09dd0fe01c8d6b356cfcb87134eac58a1057184
parent 388835 cd57a2b7e385b24367c88ee56e3a2f0fd0be345c
child 525610 266b790def49b0b2e39fef704811859641c40c50
push id23246
push userjichen@mozilla.com
push dateMon, 18 Jul 2016 05:54:31 +0000
bugs1287019
milestone50.0a1
Bug 1287019 - part2: prevent saving redundant screenshots in mozlog's HTML format result. There are two identical pairs of screenshots (test/reference pair) which are png/base64 raw files generated from mozlog's HTML formatter. One pair is stored in the img element to present the visual result; the other pair is stored as a hyperlink source in the visual result's title. After part1 patch, we may have one more pair. It appears that the hyperlinks of the visual result's titles could be eliminated since they are visually closed to the visual results, and clicking the visual results provides the exact same function. DONTBUILD (NPOTB) MozReview-Commit-ID: 4CLfYXX8g69
testing/mozbase/mozlog/mozlog/formatters/html/html.py
--- a/testing/mozbase/mozlog/mozlog/formatters/html/html.py
+++ b/testing/mozbase/mozlog/mozlog/formatters/html/html.py
@@ -125,20 +125,17 @@ class HTMLFormatter(base.BaseFormatter):
                     ('image1','Image 1 (test)'),
                     ('image2','Image 2 (reference)')
                 ]
                 for title, description in images:
                     screenshot = '%s' % debug[title]
                     additional_html.append(html.div(
                         html.a(html.img(src=screenshot), href="#"),
                         html.br(),
-                        html.a(
-                            description,
-                            href=screenshot,
-                            target='_blank'),
+                        html.a(description),
                         class_='screenshot'))
 
             if debug.get('screenshot'):
                 screenshot = '%s' % debug['screenshot']
                 screenshot = 'data:image/png;base64,' + screenshot
 
                 additional_html.append(html.div(
                     html.a(html.img(src=screenshot), href="#"),