forked from forkphorus/forkphorus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuite.html
116 lines (100 loc) · 2.36 KB
/
suite.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html>
<head>
<title>Test Suite</title>
<meta charset="utf-8">
<link rel="stylesheet" href="../phosphorus.css">
<script src="../lib/purify.min.js"></script>
<script src="../lib/scratch-sb1-converter.js"></script>
<script src="../lib/jszip.min.js"></script>
<script src="../lib/fontfaceobserver.standalone.js"></script>
<script src="../lib/canvg.min.js"></script>
<script src="../phosphorus.dist.js"></script>
<script src="../common.js"></script>
<style>
#suite-container {
position: relative;
border: 1px solid black;
width: 480px;
height: 360px;
margin: 5px 0;
}
.suite-failed {
background-color: rgb(255, 204, 204);
}
.suite-passed {
background-color: rgb(204, 255, 204);
}
table {
border-collapse: collapse;
}
th {
min-width: 100px;
}
td {
vertical-align: top;
}
table.border, table.border td, table.border th {
border: 1px solid black;
}
.cell-name {
font-family: monospace;
}
.cell-result {
font-family: monospace;
white-space: pre-wrap;
}
.cell-result-okay {
background-color: #4aea4a;
}
.cell-result-fail {
background-color: #ea5b5b;
}
.cell-total-time, .cell-project-time {
text-align: center;
}
</style>
</head>
<body>
<h1>Test suite</h1>
<p>Test suite for forkphorus. <a href="https://github.com/forkphorus/forkphorus/tree/master/tests#readme">More information</a>.</p>
<table>
<tr>
<td><div id="suite-container"></div></td>
<td><div id="suite-final-results"></div></td>
</tr>
</table>
<table class="border">
<thead>
<tr>
<th><!-- Project Path --></th>
<th>Result</th>
<th>Total Time</th>
<th>Project Time</th>
</tr>
</thead>
<tbody id="suite-table"></tbody>
</table>
<script src="suite.js"></script>
<script src="tests.js"></script>
<script>
(function() {
'use strict';
if (!P.suite) {
alert('test suite could not load');
}
if (location.search.indexOf('benchmark') > -1) {
P.suite.defaults.repeatCount = 50;
}
P.audio.context = null;
if (location.search.indexOf('nostart') === -1) {
P.suite.run(P.suite.tests());
} else {
window.runTests = function() {
P.suite.run(P.suite.tests());
};
}
}());
</script>
</body>
</html>