Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Skia Fuzzer</title> | 4 <title>Skia Fuzzer</title> |
| 5 {{template "header.html" .}} | 5 {{template "header.html" .}} |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <scaffold-sk responsiveWidth="700px"> | |
| 9 {{template "titlebar.html" .}} | |
| 10 <div id="fuzzes"></div> | |
| 11 </scaffold-sk> | |
| 12 | |
| 13 <script type="text/javascript" charset="utf-8"> | |
| 14 (function() { | |
| 15 var page = {}; | |
|
jcgregorio
2015/06/01 14:39:47
This looks good, but wrap it in the 'then' of the
humper
2015/06/01 16:14:43
Done.
| |
| 16 var fuzzes = []; | |
| 17 | |
| 18 page.state = { | |
| 19 failed: true, | |
| 20 passed: false | |
| 21 }; | |
| 22 | |
| 23 function displayFuzzes() { | |
| 24 var container = $$$("#fuzzes"); | |
| 25 sk.clearChildren(container); | |
| 26 | |
| 27 fuzzes.forEach(function(c, i) { | |
| 28 var s = document.createElement('fuzz-summary-sk'); | |
| 29 s.hash = c; | |
| 30 | |
| 31 container.appendChild(s); | |
| 32 }) | |
| 33 } | |
| 34 | |
| 35 function loadFuzzes() { | |
| 36 sk.get("{{.LoadFuzzListURL}}?"+sk.query.fromObject(page.state)). then(JSON.parse).then(function(data) { | |
| 37 fuzzes = data; | |
| 38 displayFuzzes(); | |
| 39 }); | |
| 40 } | |
| 41 | |
| 42 path = document.location.pathname; | |
| 43 if (path.startsWith("/passed")) { | |
| 44 page.state.failed = false; | |
| 45 page.state.passed = true; | |
| 46 } | |
| 47 | |
| 48 sk.stateReflector(page, loadFuzzes); | |
| 49 })(); | |
| 50 </script> | |
| 51 | |
| 8 {{template "footer.html" .}} | 52 {{template "footer.html" .}} |
| 9 </body> | 53 </body> |
| 10 </html> | 54 </html> |
| OLD | NEW |