Permalink
Browse files

Regenerated console runner files. Excluded generated test cases.

- Regenerated console runner files to reflect previous changes in harness.
- Added console/TestCases to .hgignore, 23,000+ generated files that apparently nobody wants to commit.
  • Loading branch information...
Norbert Lindenberg
Norbert Lindenberg committed Aug 27, 2012
1 parent e77b0e0 commit 1be52e222bddc6acfb14ad3a655d6359e121dc93
Showing with 390 additions and 111 deletions.
  1. +1 −0 .hgignore
  2. +86 −25 console/harness/helper.js
  3. +5 −1 console/harness/sta.js
  4. +298 −85 console/harness/sth.js
View
@@ -2,3 +2,4 @@
\.d8_history$
~$
\.pyc$
console/TestCases
View
@@ -34,58 +34,97 @@ function Presenter() {
}
}
/* Updates the displayed version. */
this.setVersion = function(v) {
version = v;
$(".targetTestSuiteVersion").text(v);
}
this.setDate = function(d) {
/* Updates the displayed date. */
this.setDate = function(d) {
date = d;
$(".targetTestSuiteDate").text(d);
}
/* Updates the displayed number of tests to run. */
this.setTotalTests = function(tests) {
totalTests = tests;
$('#testsToRun').text(tests);
}
/* Write status to the activity bar. */
/* Write status to the activity bar. */
this.updateStatus = function (str) {
this.activityBar.text(str);
}
this.finished = function(elapsed) {
$('.button-start').attr('src', 'images/start.png');
$('.button-start').fadeOut('fast');
/* When starting to load a test, create a table row entry and buttons. Display file path. */
this.setTestWaiting = function(index, path) {
var appendMsg = '<tr class="waiting"><td height="29" class="chapterName">Waiting to load test file: ' + path + '</td>';
appendMsg += '<td width="83"><img src="images/select.png" alt="Select" title="Toggle the selection of this chapter." /></td>';
appendMsg += '<td width="83"><img src="images/run.png" alt="Run" title="Run this chapter individually." /></td></tr>';
$('#chapterSelector table').append(appendMsg);
// Find the table row
var tr = $('#chapterSelector table tr').filter(":last-child");
// Attach click listeners to the buttons
tr.find("img").filter('[alt="Select"]').bind("click", {tr: tr, index: index}, function(event) {
controller.toggleSelection(event.data.index);
// Deselect row
if(event.data.tr.hasClass("selectedChapter")) {
event.data.tr.removeClass("selectedChapter");
event.data.tr.find('img').filter('[alt="Selected"]').attr({
src: 'images/select.png',
alt: 'Select'
});
}
// Select row
else {
event.data.tr.addClass("selectedChapter");
event.data.tr.find('img').filter('[alt="Select"]').attr({
src: 'images/selected.png',
alt: 'Selected'
});
}
});
}
this.setTestLoading = function(index, path) {
var tr = $('#chapterSelector table tr').filter(":nth-child(" + (index+1) + ")");
tr.removeClass("waiting");
tr.addClass("loading");
tr.find(":first-child").html("Loading test file: " + path);
};
/* On test loaded, display the chapter name and the number of tests */
this.setTestLoaded = function(index, name, numTests) {
var tr = $('#chapterSelector table tr').filter(":nth-child(" + (index+1) + ")");
tr.removeClass("loading");
tr.find("td").filter(":first-child").html(name + " (" + numTests + " tests)");
}
/* Called when the tests finish executing. */
this.finished = function(elapsed) {
progressBar.find(".text").html("Testing complete!");
if (isSiteDebugMode()) {
this.activityBar.text('Overall Execution Time: ' + elapsed + ' minutes');
} else {
this.activityBar.text('');
}
}
this.started = function () {
$('.button-start').attr('src', 'images/pause.png');
}
this.paused = function () {
$('.button-start').attr('src', 'images/resume.png');
}
this.reset = function() {
this.reset = function () {
globalSection.reset();
updateCounts();
this.activityBar.text('');
logger.empty();
currentSection = globalSection;
renderCurrentSection();
$('.button-start').show();
}
/* Do some setup tasks. */
/* Do some setup tasks. */
this.setup = function() {
backLink = $('#backlinkDiv');
backLink.click(goBack);
@@ -105,7 +144,29 @@ function Presenter() {
renderCurrentSection();
}
//**IMPLEMENTATION DETAILS***************************************************
/* The state machine for the button display. */
this.setState = function(state) {
// Hide all the buttons
$('.progressBarButtons img').addClass("hide");
// Only show what is needed.
if(state == 'loading') {
$('#btnRunAll').removeClass('hide');
$('#btnRunSelected').removeClass('hide');
}
else if(state == 'paused') {
$('#btnResume').removeClass('hide');
$('#btnReset').removeClass('hide');
}
else if(state == 'running') {
$('#btnPause').removeClass('hide');
}
else if(state == 'loaded') {
$('#btnRunAll').removeClass('hide');
$('#btnRunSelected').removeClass('hide');
}
};
//**IMPLEMENTATION DETAILS***************************************************
/* Renders the current section into the report window. */
function renderCurrentSection() {
@@ -352,11 +413,11 @@ function Presenter() {
xml = '<testRun>\r\n' +
'<userAgent>' + window.navigator.userAgent + '</userAgent>\r\n' +
'<Date>' + dateNow.toDateString() + '</Date>\r\n' +
'<targetTestSuiteName>ECMAScript Test262 Site</targetTestSuiteName>\r\n' +
'<targetTestSuiteVersion>' + version + '</targetTestSuiteVersion>\r\n' +
'<targetTestSuiteDate>' + date + '</targetTestSuiteDate>\r\n' +
' <Tests>\r\n\r\n';
'<Date>' + dateNow.toDateString() + '</Date>\r\n' +
'<targetTestSuiteName>ECMAScript Test262 Site</targetTestSuiteName>\r\n' +
'<targetTestSuiteVersion>' + version + '</targetTestSuiteVersion>\r\n' +
'<targetTestSuiteDate>' + date + '</targetTestSuiteDate>\r\n' +
' <Tests>\r\n\r\n';
reportWindow = window.open();
reportWindow.document.writeln("<title>ECMAScript Test262 XML</title>");
View
@@ -771,6 +771,9 @@ function TimeClip(time) {
}
//Test Functions
//ConstructDate is considered deprecated, and should not be used directly from
//test262 tests as it's incredibly sensitive to DST start/end dates that
//vary with geographic location.
function ConstructDate(year, month, date, hours, minutes, seconds, ms){
/*
* 1. Call ToNumber(year)
@@ -804,7 +807,8 @@ function ConstructDate(year, month, date, hours, minutes, seconds, ms){
var r10 = MakeTime(r4, r5, r6, r7);
var r11 = MakeDate(r9, r10);
return TimeClip(UTC(r11));
var retVal = TimeClip(UTC(r11));
return retVal;
}
Oops, something went wrong.

0 comments on commit 1be52e2

Please sign in to comment.