summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional/ispy/server/views/main_view.html
blob: d722c6a729cfc0e17e6ac24f39f018d15ad29c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
  <head>
    <title>{{ test_run }} failures</title>
    <style>
      .image {
        max-height: 325px;
        max-width: 325px;
      }
      .cell {
        padding-right: 25px;
        padding-left: 25px;
        float: left;
        width: 20%;
      }
      .imagelink {
        border-width: 0px;
      }
      .info {
        padding-bottom: 25px;
      }
      .row {
        padding-top: 10px;
        padding-bottom: 10px;
        border-bottom: 2px solid #888;
        height: 350px;
      }
    </style>

    <script language="javascript">
    var confirmSubmit = function() {
      return confirm("The screenshots generated with this version of chrome will be used as the expected images for future comparisions. Are you sure?");
    }
    </script>
  </head>
  <body>
    <h3>Test Run: {{ test_run }}</h3>
    {% if can_rebaseline %}
      <form action="/rebaseline" method="post" onsubmit="return confirmSubmit();">
        <input type="hidden" name="test_run" value="{{ test_run }}"/>
        <input type="submit" value="Set as LKGR"/>
      </form>
      <br>
    {% endif %}
    {% if not comparisons %}
      <h2>No failures.</h2>
    {% endif %}
    {% for comp in comparisons %}
      <div class="row">
        <div class="cell">
          Diff&nbsp;&nbsp;({{ "%.1f"|format(comp['percent_different']) }}%)<br>
          <a class="imagelink" href="{{ comp['diff'] }}">
            <img class="image" src={{ comp['diff'] }}>
          </a>
        </div>
        <div class="cell">
          Expected<br>
          <a class="imagelink" href="{{ comp['expected'] }}">
            <img class="image" src={{ comp['expected'] }}>
          </a>
        </div>
        <div class="cell">
          Actual<br>
          <a class="imagelink" href="{{ comp['actual'] }}">
            <img class="image" src={{ comp['actual'] }}>
          </a>
        </div>
        <div class="cell">
          <br>
          <div class="info">
            {{ comp['expectation'] }}<br>
            <a href='/debug_view?test_run={{ comp['test_run'] }}&expectation={{ comp['expectation'] }}'>Debug View</a>
          </div>
        </div>
      </div>
    {% endfor %}
  </body>
</html>