This repository has been archived by the owner on Apr 2, 2021. It is now read-only.
/
index.html
92 lines (81 loc) · 3.16 KB
/
index.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--WYMeditor unit tests-->
<html>
<head>
<meta content="charset=utf-8" />
<title>WYMeditor Test Suite</title>
<link rel="stylesheet" href="qunit/qunit-1.12.0.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="../../wymeditor/skins/default/skin.css" />
<script type="text/javascript" src="../load-src.dev.js"></script>
<script type="text/javascript">
// Read the URL params to allow switching the version of jquery
// Adapted from qunit.js code
// To test using jquery 1.6.2 on google's CDN, for example, use:
// unit/?jquery=1.6.2
var queryString = window.location.search;
var params = queryString.slice(1).split("&");
var length = params.length;
var urlParams = {};
var current;
for (var i = 0; i < length; ++i) {
current = params[i].split( "=" );
current[0] = decodeURIComponent(current[0]);
// allow just a key to turn on a flag, e.g., test.html?noglobals
current[1] = current[1] ? decodeURIComponent(current[1]) : true;
urlParams[current[0]] = current[1];
}
// Set global variables for checking if phantomjs is being used
inPhantomjs = (urlParams["inPhantomjs"] === 'true') ? true : false;
loadWymSrc(
'../../',
[
// Plugins
"../../wymeditor/plugins/embed/jquery.wymeditor.embed.js",
"../../wymeditor/plugins/list/jquery.wymeditor.list.js",
"../../wymeditor/plugins/table/jquery.wymeditor.table.js",
"../../wymeditor/plugins/structured_headings/jquery.wymeditor.structured_headings.js",
"qunit/qunit-1.12.0.js",
"qunit/qunit-tap.js",
// Sinon files
"sinon/sinon-1.7.3.js",
"sinon/sinon-qunit-1.0.0.js",
// An HTML beautifier
"../../lib/beautify-html.js",
// Test files
"utils.js",
"test.js",
"specific_feature_tests/xml_parser.js",
"specific_feature_tests/lists.js",
"specific_feature_tests/blocking_elements.js",
"specific_feature_tests/containers.js",
"plugin_tests/table_test.js",
"plugin_tests/embed.js",
"plugin_tests/structured_headings.js"
],
urlParams['jquery']
);
</script>
<script>
if (urlParams.tapOutput) {
// Only provide tap output when ?tapOutput=true
// When running via phantomJS, use that URL
qunitTap(QUnit, function() { console.log.apply(console, arguments); });
}
</script>
</head>
<body>
<h1 id="qunit-header">WYMeditor Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<div>
<form id="wym-form" method="post" action="">
<textarea id="wym0" class="wym"></textarea>
<input type="submit" class="wymupdate" />
<input type="button" class="wymclear" name="Clear" value="Clear" />
</form>
</div>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture"></div>
</body>
</html>