3 <title>Debug {{ expectation }}
</title>
4 <script language=
"javascript">
6 var toggle_interval
= null;
8 var toggle = function() {
9 current
= (current
+ 1) % 2;
10 var image
= document
.getElementById("screenshot");
11 image
.src
= (current
? "{{ actual }}" : "{{ expected }}");
12 var title
= document
.getElementById("text");
13 title
.textContent
= (current
? "Actual" : "Expected");
16 var setup = function() {
18 toggle_interval
= window
.setInterval(toggle
, 1000);
21 var manualToggle = function() {
22 if (toggle_interval
!= null)
23 window
.clearInterval(toggle_interval
);
27 var confirmSubmit = function() {
28 return confirm("The area in this diff will be ignored in all future comparisions. Are you sure?");
32 <body onload=
"setup();">
34 <a href=
"javascript:void(0)" onclick=
"manualToggle();">Toggle
</a>
36 <span id=
"text"></span>
39 <form action=
"/update_mask" method=
"post" onsubmit=
"return confirmSubmit();">
40 <input type=
"hidden" name=
"test_run" value=
"{{ test_run }}"/>
41 <input type=
"hidden" name=
"expectation" value=
"{{ expectation }}"/>
42 <input type=
"submit" value=
"Ignore similar diffs in the future"/>
45 <img id=
"screenshot" src=
""/>