forked from TOGoS/DeepFreezerJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
43 lines (38 loc) · 974 Bytes
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Freezer Test</title>
<style>
.success { color: darkgreen; }
.failure { color: darkred; }
</style>
</head>
<body>
<p class="notes" id="notes">...</p>
<script type="text/javascript">
var failureMessage = null;
function failForTheBrowser(message) {
failureMessage = message;
}
</script>
<script type="text/javascript" src="DeepFreezer.js"></script>
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript">
(function() {
"use strict";
var notesElem = document.getElementById('notes');
if( typeof testsRan === 'undefined' || !testsRan ) {
notesElem.innerHTML = "Tests didn't even run!";
notesElem.className += " failure";
} else if( failureMessage === null ) {
notesElem.innerHTML = "Success!";
notesElem.className += " success";
} else {
notesElem.innerHTML = "Failure! "+failureMessage;
notesElem.className += " failure";
}
})();
</script>
</body>
</html>