2011-10-10 18:11:13 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
|
|
|
|
<title>Jasmine Test Runner - Generated by jasmine-headless-webkit</title>
|
2011-10-27 00:05:05 +00:00
|
|
|
<script type="text/javascript" src="<%= Jasmine::Headless.root.join('vendor/assets/javascripts/prolog.js') %>"></script>
|
2011-10-10 18:11:13 +00:00
|
|
|
<%= files.join("\n") %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
if (window.JHW) { HeadlessReporterResult.specLineNumbers = <%= MultiJson.encode(spec_lines) %>; }
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript">
|
2011-10-27 00:05:05 +00:00
|
|
|
jasmine.getEnv().console = {
|
2011-12-29 23:37:23 +00:00
|
|
|
log: function(msg) { JHW.print('stdout', msg + "\n"); }
|
2011-10-27 00:05:05 +00:00
|
|
|
}
|
|
|
|
|
2011-11-25 16:20:14 +00:00
|
|
|
window._onload = window.onload;
|
2011-10-10 18:11:13 +00:00
|
|
|
|
|
|
|
window.onload = function() {
|
2011-11-25 16:20:14 +00:00
|
|
|
if (window._onload && (window._onload != window.onload)) {
|
|
|
|
window._onload();
|
|
|
|
}
|
2011-10-27 00:05:05 +00:00
|
|
|
|
2011-10-10 18:11:13 +00:00
|
|
|
if (window.JHW) {
|
2011-12-29 23:37:23 +00:00
|
|
|
<%= jhw_reporters %>
|
2011-10-10 18:11:13 +00:00
|
|
|
} else {
|
2011-11-21 22:03:44 +00:00
|
|
|
types = [ 'HtmlReporter', 'TrivialReporter' ];
|
|
|
|
|
|
|
|
for (var i = 0, j = types.length; i < j; ++i) {
|
|
|
|
var type = jasmine[types[i]]
|
|
|
|
if (type) {
|
|
|
|
jasmine.getEnv().addReporter(new type());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-01-18 23:04:36 +00:00
|
|
|
|
2012-02-03 20:12:28 +00:00
|
|
|
var location = window.location.href;
|
|
|
|
|
2012-01-18 23:04:36 +00:00
|
|
|
var getLastModified = function(callback) {
|
|
|
|
var http = new XMLHttpRequest();
|
|
|
|
var header;
|
|
|
|
|
2012-02-03 20:12:28 +00:00
|
|
|
http.open('HEAD', location, true);
|
2012-01-18 23:04:36 +00:00
|
|
|
|
|
|
|
http.onreadystatechange = function() {
|
2012-02-03 20:12:28 +00:00
|
|
|
console.log(http);
|
|
|
|
console.log(http.getResponseHeader('Last-Modified'));
|
2012-01-18 23:04:36 +00:00
|
|
|
callback(http.getResponseHeader('Last-Modified'));
|
|
|
|
};
|
|
|
|
http.send();
|
|
|
|
}
|
|
|
|
|
|
|
|
getLastModified(function(currentLastModified) {
|
|
|
|
var checker;
|
|
|
|
checker = function() {
|
|
|
|
setTimeout(function() {
|
|
|
|
getLastModified(function(newLastModified) {
|
|
|
|
if (currentLastModified != newLastModified) {
|
|
|
|
setTimeout(function() { window.location.reload(); }, 1000);
|
|
|
|
} else {
|
|
|
|
checker();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}, 3000);
|
|
|
|
};
|
|
|
|
|
|
|
|
checker();
|
|
|
|
});
|
2011-10-10 18:11:13 +00:00
|
|
|
}
|
2011-10-27 00:05:05 +00:00
|
|
|
|
2011-10-10 18:11:13 +00:00
|
|
|
jasmine.getEnv().execute();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|