mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 00:34:55 +00:00
Move the editions into a subfolder
This commit is contained in:
55
editions/tw2/source/tiddlywiki/test/reporter.html
Executable file
55
editions/tw2/source/tiddlywiki/test/reporter.html
Executable file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Test Suite</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles/main.css">
|
||||
<style type="text/css">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="../jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery.noConflict();
|
||||
|
||||
(function($) {
|
||||
|
||||
var uri = "http://localhost/reporter.php";
|
||||
|
||||
$(document).ready(function() {
|
||||
$("<iframe id='frm_core' />").attr("src", "tests.html").
|
||||
width(800).height(600).
|
||||
appendTo(document.body).
|
||||
load(function() { getTestResults(this); });
|
||||
});
|
||||
|
||||
var getTestResults = function(frm) {
|
||||
var container = $(frm).contents().find("#testresult");
|
||||
if(container.length) {
|
||||
var total = container.find(".all").text();
|
||||
var failures = container.find(".bad").text();
|
||||
reportTestResults(total, failures);
|
||||
} else { // poll
|
||||
setTimeout(function() { getTestResults(frm); }, 10);
|
||||
}
|
||||
};
|
||||
|
||||
var reportTestResults = function(total, failures) {
|
||||
if(window.Components && window.netscape && window.netscape.security &&
|
||||
document.location.protocol.indexOf("http") == -1) {
|
||||
window.netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
}
|
||||
$.post(uri, { total: total, failures: failures });
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user