File size: 1,989 Bytes
af6912c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
	<!--
	Run this to check the browser compatibility of abcjs on a wide variety of browsers.
	This uses the compiled but uncompressed library.

	This has the same effect as the all.html file that works with modern browsers but it
	works in a wider range of browsers.

	It can't use the node.js version because the Tarp library (used to polyfill
	the require statement) is not very browser-compatible.

	Here are the oldest browser versions that have been tested:
	Firefox 32
	Safari 5.1
	IE 10
	Samsung 4.1
	Chrome 37
	Opera 23
	Edge 80
	-->
	<meta charset="utf-8" />
	<title>Browser Compatibility Test</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
	<script src="../dist/abcjs-basic.js" type="text/javascript"></script>
</head>
<body>
<div id="mocha"></div>
<div id="paper"></div>
<div id="midi"></div>
<script>
	// The tests were written for the node version, so just make either entry point valid.
	window.abcjs = window.ABCJS;

	// This is the one polyfill needed for the test runner.
	if (!Error.captureStackTrace) {
		console.log("Polyfill captureStackTrace")
		var container = new Error();

		Object.defineProperty({}, 'stack', {
			configurable: true,
			get: function getStack() {
				var stack = container.stack;

				Object.defineProperty(this, 'stack', {
					value: stack
				});

				return stack;
			}
		});
	}
</script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script class="mocha-init">
	mocha.setup({ui: 'bdd', globals: ['__VUE_DEVTOOLS_TOAST__']});
	mocha.checkLeaks();
</script>

<script src="synth/flattener.test.js"></script>
<script src="synth/midi.test.js"></script>
<script src="visual/wrap.test.js"></script>
<script src="visual/selection.test.js"></script>
<script src="visual/options.test.js"></script>

<script>
	mocha.run();
</script>

</body>
</html>