mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 23:34:50 +00:00
56 lines
1.5 KiB
HTML
Executable File
56 lines
1.5 KiB
HTML
Executable File
<!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>
|