diff --git a/test/public/app.js b/test/public/app.js index 655f985..aeb5e7f 100644 --- a/test/public/app.js +++ b/test/public/app.js @@ -12,15 +12,20 @@ function create(type) { function runTests() { var table = get('tests'); for (var name in tests) { - var canvas = create('canvas') + var fn = tests[name] + , canvas = create('canvas') , tr = create('tr') - , tds = [create('td'), create('td')]; + , tds = [create('td'), create('td'), create('td')] + , src = create('pre'); + src.innerText = fn.toString(); canvas.width = 200; canvas.height = 200; canvas.title = name; tds[1].appendChild(canvas); + tds[2].appendChild(src); tr.appendChild(tds[0]); tr.appendChild(tds[1]); + tr.appendChild(tds[2]); table.appendChild(tr); runTest(name, canvas, tds[0]); } diff --git a/test/public/style.css b/test/public/style.css index 3e779ae..9f2a43e 100644 --- a/test/public/style.css +++ b/test/public/style.css @@ -15,9 +15,15 @@ canvas, img { padding: 5px; border: 1px solid #eee; } -#primary { - width: 600px; +pre { + height: 200px; + font-size: 12px; + overflow: auto; +} +p.msg { + width: 400px; } #tests { + width: 100%; margin-top: 35px; } \ No newline at end of file diff --git a/test/views/tests.jade b/test/views/tests.jade index 6558860..83109f2 100644 --- a/test/views/tests.jade +++ b/test/views/tests.jade @@ -9,4 +9,5 @@ table#tests thead th node-canvas th target + th source tbody \ No newline at end of file