Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (95 sloc) 3.0 kb
<!DOCTYPE html>
<!--
Copyright 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<title>Closure - All JsUnit Tests</title>
<script src="closure/goog/base.js"></script>
<script src="alltests.js"></script>
<script>
goog.require('goog.testing.MultiTestRunner');
</script>
<link rel="stylesheet" href="closure/goog/css/multitestrunner.css" type="text/css">
<style>
h1 {
font: normal x-large arial, helvetica, sans-serif;
margin: 0;
}
p, form {
font: normal small sans-serif;
margin: 0;
}
#header {
position: absolute;
right: 10px;
top: 13px;
}
#footer {
margin-top: 8px;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Closure - All JsUnit Tests</h1>
<p id="header">
<a href="http://wiki/Main/ClosureUnitTests">Closure JS Testing HOWTO</a>
</p>
<div id="runner"></div>
<!-- Use a form so browser persists input values -->
<form id="footer" onsubmit="return false">
Settings:<br>
<input type="checkbox" name="hidepasses" id="hidepasses" checked>
<label for="hidepasses">Hide passes</label><br>
<input type="checkbox" name="parallel" id="parallel" checked>
<label for="parallel">Run in parallel</label>
<small>(timing stats not available if enabled)</small><br>
<input type="text" name="filter" id="filter" value="">
<label for="filter">Run only tests for path</label>
</form>
<script>
var hidePassesInput = document.getElementById('hidepasses');
var parallelInput = document.getElementById('parallel');
var filterInput = document.getElementById('filter');
function setFilterFunction() {
var matchValue = filterInput.value || '';
testRunner.setFilterFunction(function(testPath) {
return testPath.indexOf(matchValue) > -1;
});
}
// Create a test runner and render it.
var testRunner = new goog.testing.MultiTestRunner()
.setName(document.title)
.setBasePath('./')
.setPoolSize(parallelInput.checked ? 8 : 1)
.setStatsBucketSizes(5, 500)
.setHidePasses(hidePassesInput.checked)
//.setVerbosePasses(true)
.addTests(_allTests);
testRunner.render(document.getElementById('runner'));
goog.events.listen(hidePassesInput, 'click', function(e) {
testRunner.setHidePasses(e.target.checked);
});
goog.events.listen(parallelInput, 'click', function(e) {
testRunner.setPoolSize(e.target.checked ? 8 : 1);
});
goog.events.listen(filterInput, 'keyup', setFilterFunction);
setFilterFunction();
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.