mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-08 22:08:16 +00:00
64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
<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/MemoryStats.js"></script>
|
|
<script type="text/javascript" src="SimpleTest/TestRunner.js"></script>
|
|
<script type="text/javascript" src="SimpleTest/MozillaLogger.js"></script>
|
|
<!--<link rel="stylesheet" type="text/css" href="/static/main.css" />-->
|
|
</head>
|
|
<body>
|
|
<p><a href="#" id="runtests">Click To Run Tests</a></p>
|
|
<!--<div id="mt_maketemplate">Make Template for Bug <input type="text" /></div>-->
|
|
<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 close the browser when complete
|
|
if (params.closeWhenDone) {
|
|
TestRunner.onComplete = SpecialPowers.quit;
|
|
}
|
|
|
|
// logFile to write our results
|
|
if (params.logFile) {
|
|
var spl = SpecialPowersLogger(params.logFile);
|
|
TestRunner.logger.addListener("mozLogger", fileLevel + "", spl.getLogCallback());
|
|
}
|
|
|
|
var RunSet = {};
|
|
RunSet.runall = function() {
|
|
TestRunner.runTests(
|
|
'test_bug362788.xhtml'
|
|
);
|
|
};
|
|
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>
|