2006-10-26 00:40:15 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<!-- This harness does not work locally in Safari -->
|
|
|
|
<script type="text/javascript" src="../MochiKit/MochiKit.js"></script>
|
|
|
|
<script type="text/javascript" src="SimpleTest/TestRunner.js"></script>
|
|
|
|
<script type="text/javascript" src="SimpleTest/MozillaFileLogger.js"></script>
|
|
|
|
<script type="text/javascript" src="SimpleTest/quit.js"></script>
|
2006-10-26 22:57:34 +04:00
|
|
|
<!--<link rel="stylesheet" type="text/css" href="/static/main.css" />-->
|
2006-10-26 00:40:15 +04:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p><a href="#" id="runtests">Click To Run Tests</a></p>
|
2006-10-26 22:57:34 +04:00
|
|
|
<!--<div id="mt_maketemplate">Make Template for Bug <input type="text" /></div>-->
|
2006-10-26 00:40:15 +04:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
TestRunner.logEnabled = true;
|
|
|
|
TestRunner.logger = new Logger();
|
|
|
|
|
|
|
|
// Check the query string for arguments
|
|
|
|
var params = parseQueryString(location.search.substring(1), true);
|
|
|
|
|
|
|
|
// log levels for console and logfile
|
|
|
|
var fileLevel = params.fileLevel || null;
|
|
|
|
var consoleLevel = params.consoleLevel || null;
|
|
|
|
|
|
|
|
// closeWhenDone tells us to call quit.js when complete
|
|
|
|
if (params.closeWhenDone) {
|
|
|
|
TestRunner.onComplete = goQuitApplication;
|
|
|
|
}
|
|
|
|
|
|
|
|
// logFile to write our results
|
|
|
|
if (params.logFile) {
|
|
|
|
MozillaFileLogger.init(params.logFile);
|
2006-10-30 02:55:03 +03:00
|
|
|
TestRunner.logger.addListener("mozLogger", fileLevel + "", MozillaFileLogger.getLogCallback());
|
2006-10-26 00:40:15 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// if we get a quiet param, don't log to the console
|
|
|
|
if (!params.quiet) {
|
|
|
|
function dumpListener(msg) {
|
|
|
|
dump("*** " + msg.num + " " + msg.level + " " + msg.info.join(' ') + "\n");
|
|
|
|
}
|
|
|
|
TestRunner.logger.addListener("dumpListener", consoleLevel + "", dumpListener);
|
|
|
|
}
|
|
|
|
|
|
|
|
var RunSet = {}
|
|
|
|
RunSet.runall = function() {
|
|
|
|
TestRunner.runTests(
|
2006-12-18 23:47:49 +03:00
|
|
|
'test_bug362788.xhtml',
|
2007-04-14 21:46:36 +04:00
|
|
|
'test_bug366645.xhtml'
|
2006-10-26 00:40:15 +04:00
|
|
|
);
|
|
|
|
};
|
|
|
|
RunSet.reloadAndRunAll = function() {
|
|
|
|
if (params.autorun) {
|
|
|
|
window.location.href = window.location.href;
|
|
|
|
} else if (location.search) {
|
|
|
|
window.location.href = window.location.href + "&autorun=1";
|
|
|
|
} else {
|
|
|
|
window.location.href = window.location.href + "?autorun=1";
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// run automatically if
|
|
|
|
if (params.autorun) {
|
|
|
|
RunSet.runall();
|
|
|
|
}
|
|
|
|
|
|
|
|
// hook up our buttons
|
|
|
|
connect("runtests", "onclick", RunSet, "reloadAndRunAll");
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<small>Based on the <a href="http://www.mochikit.com/">MochiKit</a> unit tests.</small>
|
|
|
|
</body>
|
|
|
|
</html>
|