2012-02-29 23:23:47 +01:00
|
|
|
/// Copyright (c) 2012 Ecma International. All rights reserved.
|
2015-07-17 17:42:45 +02:00
|
|
|
/// This code is governed by the BSD license found in the LICENSE file.
|
2010-11-16 06:23:35 +01:00
|
|
|
|
|
|
|
/* Handles updating the page with information from the runner. */
|
|
|
|
function Presenter() {
|
|
|
|
var altStyle = '',
|
|
|
|
logger,
|
|
|
|
date,
|
|
|
|
version,
|
|
|
|
table,
|
|
|
|
backLink,
|
|
|
|
|
2012-07-18 21:32:54 +02:00
|
|
|
globalSection = new Section(null, "0", STANDARD),
|
2010-11-16 06:23:35 +01:00
|
|
|
currentSection = globalSection,
|
|
|
|
tests = {},
|
|
|
|
totalTests = 0;
|
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
var progressBar;
|
2012-07-18 21:32:54 +02:00
|
|
|
TOCFILEPATH = "metadata/" + STANDARD.toLowerCase() + "-toc.xml";
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
//**INTERFACE****************************************************************
|
|
|
|
/* Updates progress with the given test, which should have its results in it as well. */
|
|
|
|
this.addTestResult = function(test) {
|
|
|
|
tests[test.id] = test;
|
|
|
|
getSectionById(test.id).addTest(test);
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
updateCounts();
|
2010-11-16 06:23:35 +01:00
|
|
|
|
2011-09-24 01:27:46 +02:00
|
|
|
//TODO: eventually remove this guard.
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
if(test.result === 'fail') {
|
|
|
|
logResult(test);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
/* Updates the displayed version. */
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
this.setVersion = function(v) {
|
|
|
|
version = v;
|
|
|
|
$(".targetTestSuiteVersion").text(v);
|
|
|
|
}
|
2012-06-12 23:54:30 +02:00
|
|
|
|
|
|
|
/* Updates the displayed date. */
|
|
|
|
this.setDate = function(d) {
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
date = d;
|
|
|
|
$(".targetTestSuiteDate").text(d);
|
|
|
|
}
|
2012-06-12 23:54:30 +02:00
|
|
|
|
|
|
|
/* Updates the displayed number of tests to run. */
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
this.setTotalTests = function(tests) {
|
|
|
|
totalTests = tests;
|
|
|
|
$('#testsToRun').text(tests);
|
|
|
|
}
|
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
/* Write status to the activity bar. */
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
this.updateStatus = function (str) {
|
|
|
|
this.activityBar.text(str);
|
|
|
|
}
|
2012-06-12 23:54:30 +02:00
|
|
|
|
|
|
|
/* 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");
|
2011-09-24 00:10:53 +02:00
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
// 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) {
|
2011-09-24 01:27:46 +02:00
|
|
|
progressBar.find(".text").html("Testing complete!");
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
if (isSiteDebugMode()) {
|
|
|
|
this.activityBar.text('Overall Execution Time: ' + elapsed + ' minutes');
|
|
|
|
} else {
|
2011-08-25 23:14:29 +02:00
|
|
|
this.activityBar.text('');
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
}
|
|
|
|
}
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
this.reset = function () {
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
globalSection.reset();
|
|
|
|
updateCounts();
|
2012-06-12 23:54:30 +02:00
|
|
|
this.activityBar.text('');
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
logger.empty();
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
currentSection = globalSection;
|
|
|
|
renderCurrentSection();
|
2010-10-19 05:50:07 +02:00
|
|
|
}
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
/* Do some setup tasks. */
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
this.setup = function() {
|
|
|
|
backLink = $('#backlinkDiv');
|
|
|
|
backLink.click(goBack);
|
|
|
|
table = $('.results-data-table');
|
|
|
|
|
|
|
|
logger = $("#tableLogger");
|
|
|
|
progressBar = $('#progressbar');
|
|
|
|
this.activityBar = $('#nextActivity');
|
|
|
|
|
|
|
|
$('a.showSource', logger).live("click", openSourceWindow);
|
|
|
|
$('a.showError', logger).live("click", openErrorWindow);
|
|
|
|
$('#ancGenXMLReport').click(createXMLReportWindow);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Refresh display of the report */
|
|
|
|
this.refresh = function() {
|
|
|
|
renderCurrentSection();
|
|
|
|
}
|
|
|
|
|
2012-06-12 23:54:30 +02:00
|
|
|
/* 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***************************************************
|
2010-11-16 06:23:35 +01:00
|
|
|
|
|
|
|
/* Renders the current section into the report window. */
|
|
|
|
function renderCurrentSection() {
|
|
|
|
renderBreadcrumbs();
|
|
|
|
if(globalSection.totalTests === 0) {
|
|
|
|
$('#resultMessage').show();
|
|
|
|
} else {
|
|
|
|
$('#resultMessage').hide();
|
2010-11-03 18:22:23 +01:00
|
|
|
}
|
2010-11-16 06:23:35 +01:00
|
|
|
|
|
|
|
$('.totalCases').text(currentSection.totalTests);
|
|
|
|
$('.passedCases').text(currentSection.totalPassed);
|
|
|
|
$('.failedCases').text(currentSection.totalFailed);
|
|
|
|
$('#failedToLoadCounterDetails').text(currentSection.totalFailedToLoad);
|
|
|
|
table.empty();
|
|
|
|
table.append(currentSection.toHTML());
|
|
|
|
// Observe section selection and show source links
|
|
|
|
$('a.section', table).click(sectionSelected);
|
|
|
|
$('a.showSource', table).click(openSourceWindow);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Opens a window with a test's source code. */
|
|
|
|
function openSourceWindow(e) {
|
|
|
|
var test = tests[e.target.href.match(/#(.+)$/)[1]],
|
|
|
|
popWnd = window.open("", "", "scrollbars=1, resizable=1"),
|
|
|
|
innerHTML = '';
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
innerHTML += '<b>Test </b>';
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<b>' + test.id + '</b> <br /><br />\n';
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
if (test.description) {
|
|
|
|
innerHTML += '<b>Description</b>';
|
2011-09-13 10:08:50 +02:00
|
|
|
innerHTML += '<pre>' +
|
|
|
|
test.description.replace(/</g, '<').replace(/>/g, '>') +
|
2012-02-22 20:53:29 +01:00
|
|
|
' </pre>\n';
|
2010-10-19 05:50:07 +02:00
|
|
|
}
|
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
innerHTML += '<br /><br /><br /><b>Testcase</b>';
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<pre>' + test.code + '</pre>\n';
|
2010-11-16 06:23:35 +01:00
|
|
|
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<br /><b>Path</b>';
|
|
|
|
innerHTML += '<pre>' + test.path + '</pre>';
|
2015-07-17 17:43:27 +02:00
|
|
|
innerHTML += '<br /><a href="javascript:void(window.open(\'https://github.com/tc39/test262/raw/master/test'
|
|
|
|
innerHTML += test.path.replace("TestCases", "") + '\'));">' + 'GitHub source' + '</a> (might be newer than the testcase source shown above)\n'
|
2012-02-22 20:53:29 +01:00
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
popWnd.document.write(innerHTML);
|
|
|
|
}
|
2011-09-13 10:08:50 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
/* Opens a window with a test's failure message. */
|
|
|
|
function openErrorWindow(e) {
|
|
|
|
var test = tests[e.target.href.match(/#(.+)$/)[1]],
|
|
|
|
popWnd = window.open("", "", "scrollbars=1, resizable=1"),
|
|
|
|
innerHTML = '';
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2012-02-22 20:53:29 +01:00
|
|
|
var bugDetails = "";
|
|
|
|
bugDetails += "DESCRIPTION\n*Please insert your description here!*\n\n";
|
|
|
|
bugDetails += "------------------\n";
|
|
|
|
bugDetails += "TEST: " + test.path + "\n";
|
2015-07-17 17:43:27 +02:00
|
|
|
bugDetails += "SOURCE: https://github.com/tc39/test262/raw/master/test" + test.path.replace("TestCases", "") + "\n";
|
2012-02-22 20:53:29 +01:00
|
|
|
bugDetails += "TEST SUITE DATE: " + date + "\n";
|
|
|
|
bugDetails += "PLATFORM: " + navigator.userAgent + "\n";
|
|
|
|
bugDetails += "ERROR: " + test.error + "\n\n";
|
|
|
|
|
|
|
|
|
|
|
|
var bugTemplate = 'https://bugs.ecmascript.org/enter_bug.cgi?product=Test262&bug_severity=normal&component=Tests&short_desc=';
|
|
|
|
bugTemplate += encodeURIComponent('Invalid test? ' + test.id) + "&comment=";
|
|
|
|
bugTemplate += encodeURIComponent(bugDetails);
|
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
innerHTML += '<b>Test </b>';
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<b>' + test.id + '</b> <br /><br />\n';
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
innerHTML += '<b>Failure</b>';
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<pre>' + test.error + '</pre>\n';
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
innerHTML += '<br /><br /><b>Testcase</b>';
|
2012-02-22 20:53:29 +01:00
|
|
|
innerHTML += '<pre>' + test.code + '</pre>\n';
|
|
|
|
|
|
|
|
innerHTML += '<br /><br /><b>Broken test?</b>';
|
|
|
|
innerHTML += '<p>If you have reason to believe the JavaScript engine being tested<br />\n';
|
|
|
|
innerHTML += 'is actually OK and there\'s instead something wrong with the test<br />\n';
|
|
|
|
innerHTML += 'itself, please <a href="' + bugTemplate + '" onclick="window.moveTo(0,0);window.resizeTo(screen.width, screen.height);">file a bug.</a></p>\n'
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
popWnd.document.write(innerHTML);
|
2010-11-16 06:23:35 +01:00
|
|
|
}
|
2010-11-03 18:22:23 +01:00
|
|
|
|
2011-09-13 10:08:50 +02:00
|
|
|
/* Returns the section object for the specified section id
|
|
|
|
* (eg. "7.1" or "15.4.4.12").
|
|
|
|
*/
|
2010-11-16 06:23:35 +01:00
|
|
|
function getSectionById(id) {
|
|
|
|
if(id == 0)
|
|
|
|
return globalSection;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2013-06-07 13:05:37 +02:00
|
|
|
var match = id.match(/\d+|[A-F](?=\.)/g);
|
2010-11-16 06:23:35 +01:00
|
|
|
var section = globalSection;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2013-06-07 13:05:37 +02:00
|
|
|
if (match === null)
|
|
|
|
return section;
|
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
for(var i = 0; i < match.length; i++) {
|
|
|
|
if(typeof section.subsections[match[i]] !== "undefined") {
|
|
|
|
section = section.subsections[match[i]];
|
|
|
|
} else {
|
|
|
|
break;
|
2010-10-19 05:50:07 +02:00
|
|
|
}
|
2010-11-16 06:23:35 +01:00
|
|
|
}
|
|
|
|
return section;
|
|
|
|
}
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
/* Update the page with current status */
|
|
|
|
function updateCounts() {
|
|
|
|
$('#Pass').text(globalSection.totalPassed);
|
|
|
|
$('#Fail').text(globalSection.totalFailed);
|
|
|
|
$('#totalCounter').text(globalSection.totalTests);
|
|
|
|
$('#failedToLoadCounter1').text(globalSection.totalFailedToLoad);
|
|
|
|
$('#failedToLoadCounter').text(globalSection.totalFailedToLoad);
|
|
|
|
progressBar.reportprogress(globalSection.totalTests, totalTests);
|
|
|
|
}
|
2010-10-19 05:50:07 +02:00
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
/* Append a result to the run page's result log. */
|
|
|
|
function logResult(test) {
|
2011-09-22 20:43:39 +02:00
|
|
|
var appendStr = "";
|
2010-11-16 06:23:35 +01:00
|
|
|
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
2011-09-22 20:43:39 +02:00
|
|
|
if (test.result==="fail") {
|
|
|
|
appendStr += '<tbody>';
|
|
|
|
appendStr += '<tr class=\"' + altStyle + '\">';
|
|
|
|
|
|
|
|
appendStr += '<td width=\"20%\">';
|
|
|
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
|
|
|
appendStr += test.id + "</a>";
|
|
|
|
appendStr += '</td>';
|
|
|
|
|
|
|
|
appendStr += '<td>' + test.description + '</td>';
|
|
|
|
|
|
|
|
appendStr += '<td align="right">';
|
|
|
|
appendStr += '<span class=\"Fail\">' + "<a class='showError' href='#" + test.id + "'>";
|
|
|
|
appendStr += 'Fail</a></span></td></tr></tbody>';
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (test.result==="pass") {
|
|
|
|
if (! isSiteDebugMode()) { return;}
|
|
|
|
appendStr += '<tbody><tr class=\"' + altStyle + '\"><td width=\"20%\">';
|
|
|
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
|
|
|
appendStr += test.id + "</a>" + '</td><td>' + test.description;
|
|
|
|
appendStr += '</td><td align="right"><span class=\"Fail\">';
|
|
|
|
appendStr += 'Pass</span></td></tr></tbody>';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
throw "Result for '" + test.id + "' must either be 'pass' or 'fail', not '" + test.result + "'!";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-16 06:23:35 +01:00
|
|
|
logger.append(appendStr);
|
|
|
|
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
|
|
|
}
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
/* Go back to the previous section */
|
|
|
|
function goBack(e) {
|
|
|
|
e.preventDefault();
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
if(currentSection === globalSection)
|
|
|
|
return;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
currentSection = currentSection.parentSection;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
// Since users click directly on sub-chapters of the main chapters, don't go back to main
|
|
|
|
// chapters.
|
|
|
|
if(currentSection.parentSection === globalSection)
|
|
|
|
currentSection = globalSection;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
renderCurrentSection();
|
2010-11-16 06:23:35 +01:00
|
|
|
}
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
/* Load the table of contents xml to populate the sections. */
|
|
|
|
function loadSections() {
|
|
|
|
var sectionsLoader = new XMLHttpRequest();
|
|
|
|
sectionsLoader.open("GET", TOCFILEPATH, false);
|
|
|
|
sectionsLoader.send();
|
|
|
|
var xmlDoc = sectionsLoader.responseXML;
|
|
|
|
var nodes = xmlDoc.documentElement.childNodes;
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
addSectionsFromXML(nodes, globalSection);
|
|
|
|
}
|
2010-10-19 05:50:07 +02:00
|
|
|
|
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
/* Recursively parses the TOC xml, producing nested sections. */
|
|
|
|
function addSectionsFromXML(nodes, parentSection){
|
|
|
|
var subsection;
|
2010-11-03 18:22:23 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
for (var i = 0; i < nodes.length; i++) {
|
|
|
|
if (nodes[i].nodeName === "sec") {
|
|
|
|
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
|
2013-06-07 13:05:37 +02:00
|
|
|
parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
addSectionsFromXML(nodes[i].childNodes, subsection);
|
|
|
|
}
|
|
|
|
}
|
2010-11-16 06:23:35 +01:00
|
|
|
}
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
/* Renders the breadcrumbs for report navigation. */
|
|
|
|
function renderBreadcrumbs() {
|
|
|
|
var container = $('div.crumbContainer div.crumbs');
|
|
|
|
var sectionChain = [];
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
var current = currentSection;
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
// Walk backwards until we reach the global section.
|
|
|
|
while(current !== globalSection && current.parentSection !== globalSection) {
|
|
|
|
sectionChain.push(current);
|
|
|
|
current = current.parentSection;
|
|
|
|
}
|
2010-10-19 05:50:07 +02:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
// Reverse the array since we want to print earlier sections first.
|
|
|
|
sectionChain.reverse();
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
// Empty any existing breadcrumbs.
|
|
|
|
container.empty();
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
// Static first link to go back to the root.
|
|
|
|
var link = $("<a href='#0' class='setBlack'>Test Sections > </a>");
|
|
|
|
link.bind('click', {sectionId: 0}, sectionSelected)
|
|
|
|
container.append(link);
|
|
|
|
|
|
|
|
for(var i = 0; i < sectionChain.length;i++) {
|
|
|
|
link = $("<a href='#" + sectionChain[i].id + "' class='setBlack'>" + sectionChain[i].id + ": " + sectionChain[i].name + " > </a>");
|
|
|
|
link.bind('click', sectionSelected)
|
|
|
|
container.append(link);
|
|
|
|
}
|
|
|
|
|
|
|
|
// If we can go back, show the back link.
|
|
|
|
if(sectionChain.length > 0) {
|
|
|
|
backLink.show();
|
2011-02-08 18:42:59 +01:00
|
|
|
} else {
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
backLink.hide();
|
2011-02-08 18:42:59 +01:00
|
|
|
}
|
2011-09-13 10:08:50 +02:00
|
|
|
};
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
/* Pops up a window with an xml dump of the results of a test. */
|
|
|
|
function createXMLReportWindow() {
|
|
|
|
var reportWindow; //window that will output the xml data
|
|
|
|
var xmlData; //array instead of string concatenation
|
|
|
|
var dateNow;
|
|
|
|
var xml; // stop condition of for loop stored in a local variable to improve performance
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
dateNow = new Date();
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
xml = '<testRun>\r\n' +
|
|
|
|
'<userAgent>' + window.navigator.userAgent + '</userAgent>\r\n' +
|
2012-06-12 23:54:30 +02:00
|
|
|
'<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';
|
2010-11-16 06:23:35 +01:00
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
reportWindow = window.open();
|
|
|
|
reportWindow.document.writeln("<title>ECMAScript Test262 XML</title>");
|
|
|
|
reportWindow.document.write("<textarea id='results' style='width: 100%; height: 800px;'>");
|
|
|
|
reportWindow.document.write(xml);
|
|
|
|
reportWindow.document.write(globalSection.toXML());
|
|
|
|
reportWindow.document.write('</Tests>\r\n</testRun>\r\n</textarea>\r\n');
|
|
|
|
reportWindow.document.close();
|
2010-11-16 06:23:35 +01:00
|
|
|
}
|
|
|
|
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
/* Callback for when the user clicks on a section in the report table. */
|
|
|
|
function sectionSelected(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
currentSection = getSectionById(e.target.href.match(/#(.+)$/)[1]);
|
|
|
|
renderCurrentSection();
|
|
|
|
table.attr("scrollTop", 0);
|
2011-09-13 10:08:50 +02:00
|
|
|
};
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
// Load the sections.
|
|
|
|
loadSections();
|
2010-10-19 05:50:07 +02:00
|
|
|
}
|
2010-11-16 06:23:35 +01:00
|
|
|
|
|
|
|
var presenter = new Presenter();
|