mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 05:55:36 +02:00
Re-gen'ed website.
This commit is contained in:
parent
cbc587c61b
commit
f381e5a4b1
@ -1,14 +1,14 @@
|
|||||||
/// Copyright (c) 2009 Microsoft Corporation
|
/// Copyright (c) 2009 Microsoft Corporation
|
||||||
///
|
///
|
||||||
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
/// that the following conditions are met:
|
/// that the following conditions are met:
|
||||||
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer.
|
/// the following disclaimer.
|
||||||
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
||||||
/// endorse or promote products derived from this software without specific prior written permission.
|
/// endorse or promote products derived from this software without specific prior written permission.
|
||||||
///
|
///
|
||||||
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||||
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||||
@ -16,7 +16,7 @@
|
|||||||
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
/* Handles updating the page with information from the runner. */
|
/* Handles updating the page with information from the runner. */
|
||||||
function Presenter() {
|
function Presenter() {
|
||||||
@ -148,7 +148,9 @@ function Presenter() {
|
|||||||
|
|
||||||
if (test.description) {
|
if (test.description) {
|
||||||
innerHTML += '<b>Description</b>';
|
innerHTML += '<b>Description</b>';
|
||||||
innerHTML += '<pre>' + test.description.replace(/</g, '<').replace(/>/g, '>'); +' </pre>';
|
innerHTML += '<pre>' +
|
||||||
|
test.description.replace(/</g, '<').replace(/>/g, '>') +
|
||||||
|
' </pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
innerHTML += '<br /><br /><br /><b>Testcase</b>';
|
innerHTML += '<br /><br /><br /><b>Testcase</b>';
|
||||||
@ -183,7 +185,9 @@ function Presenter() {
|
|||||||
popWnd.document.write(innerHTML);
|
popWnd.document.write(innerHTML);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the section object for the specified section id (eg. "7.1" or "15.4.4.12"). */
|
/* Returns the section object for the specified section id
|
||||||
|
* (eg. "7.1" or "15.4.4.12").
|
||||||
|
*/
|
||||||
function getSectionById(id) {
|
function getSectionById(id) {
|
||||||
if(id == 0)
|
if(id == 0)
|
||||||
return globalSection;
|
return globalSection;
|
||||||
@ -214,7 +218,11 @@ function Presenter() {
|
|||||||
/* Append a result to the run page's result log. */
|
/* Append a result to the run page's result log. */
|
||||||
function logResult(test) {
|
function logResult(test) {
|
||||||
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
||||||
var appendStr = '<tbody><tr class=\"' + altStyle + '\"><td width=\"20%\">' + "<a class='showSource' href='#" + test.id + "'>" + test.id + "</a>" + '</td><td>' + test.description + '</td><td align="right"><span class=\"Fail\">' + test.result + '</span></td></tr></tbody>';
|
var appendStr = '<tbody><tr class=\"' + altStyle +
|
||||||
|
'\"><td width=\"20%\">' + "<a class='showSource' href='#" +
|
||||||
|
test.id + "'>" + test.id + "</a>" + '</td><td>' +
|
||||||
|
test.description + '</td><td align="right"><span class=\"Fail\">' +
|
||||||
|
test.result + '</span></td></tr></tbody>';
|
||||||
logger.append(appendStr);
|
logger.append(appendStr);
|
||||||
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
||||||
}
|
}
|
||||||
@ -300,7 +308,7 @@ function Presenter() {
|
|||||||
} else {
|
} else {
|
||||||
backLink.hide();
|
backLink.hide();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Pops up a window with an xml dump of the results of a test. */
|
/* Pops up a window with an xml dump of the results of a test. */
|
||||||
function createXMLReportWindow() {
|
function createXMLReportWindow() {
|
||||||
@ -334,7 +342,7 @@ function Presenter() {
|
|||||||
currentSection = getSectionById(e.target.href.match(/#(.+)$/)[1]);
|
currentSection = getSectionById(e.target.href.match(/#(.+)$/)[1]);
|
||||||
renderCurrentSection();
|
renderCurrentSection();
|
||||||
table.attr("scrollTop", 0);
|
table.attr("scrollTop", 0);
|
||||||
}
|
};
|
||||||
|
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
// Load the sections.
|
// Load the sections.
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/// Copyright (c) 2009 Microsoft Corporation
|
/// Copyright (c) 2009 Microsoft Corporation
|
||||||
///
|
///
|
||||||
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
/// that the following conditions are met:
|
/// that the following conditions are met:
|
||||||
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer.
|
/// the following disclaimer.
|
||||||
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
/// * Neither the name of Microsoft nor the names of its contributors may be used to
|
||||||
/// endorse or promote products derived from this software without specific prior written permission.
|
/// endorse or promote products derived from this software without specific prior written permission.
|
||||||
///
|
///
|
||||||
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||||
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||||
@ -16,7 +16,7 @@
|
|||||||
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
/* A section of the spec. Stores test results and subsections and some rolled up stats on how many tests passed or
|
/* A section of the spec. Stores test results and subsections and some rolled up stats on how many tests passed or
|
||||||
* failed under that section
|
* failed under that section
|
||||||
@ -57,16 +57,20 @@ function Section(parentSection, id, name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Math.round((this.totalPassed / this.totalTests) * 100);
|
return Math.round((this.totalPassed / this.totalTests) * 100);
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Add a test result to this section. Pushes the result to the test array and passes the result to addTestResult to
|
/* Add a test result to this section. Pushes the result to the
|
||||||
* tabulate pass/fail numbers*/
|
* test array and passes the result to addTestResult to tabulate
|
||||||
|
* pass/fail numbers
|
||||||
|
*/
|
||||||
this.addTest = function(test) {
|
this.addTest = function(test) {
|
||||||
this.tests.push(test);
|
this.tests.push(test);
|
||||||
this.addTestResult(test);
|
this.addTestResult(test);
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Increments the various rollup counters for this section and all parent sections */
|
/* Increments the various rollup counters for this section and all
|
||||||
|
* parent sections
|
||||||
|
*/
|
||||||
this.addTestResult = function(test) {
|
this.addTestResult = function(test) {
|
||||||
this.totalTests++;
|
this.totalTests++;
|
||||||
|
|
||||||
@ -80,7 +84,7 @@ function Section(parentSection, id, name) {
|
|||||||
|
|
||||||
if(this.parentSection !== null)
|
if(this.parentSection !== null)
|
||||||
this.parentSection.addTestResult(test);
|
this.parentSection.addTestResult(test);
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Renders this section as HTML. Used for the report page.*/
|
/* Renders this section as HTML. Used for the report page.*/
|
||||||
this.toHTML = function(options) {
|
this.toHTML = function(options) {
|
||||||
@ -93,7 +97,7 @@ function Section(parentSection, id, name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var html = '<tbody id="section_' + this.id.replace(/\./g, "_") + '">';
|
var html = '<tbody id="section_' + this.id.replace(/\./g, "_") + '">';
|
||||||
|
|
||||||
if(options.header) {
|
if(options.header) {
|
||||||
html += "<tr><td class='tblHeader' colspan='3'>Chapter " + this.id + " - " + this.name + "</td>" +
|
html += "<tr><td class='tblHeader' colspan='3'>Chapter " + this.id + " - " + this.name + "</td>" +
|
||||||
"<td class='" + rollupCellClass(this.passPercent()) + "'>" + this.passPercent() + "%</td></tr>";
|
"<td class='" + rollupCellClass(this.passPercent()) + "'>" + this.passPercent() + "%</td></tr>";
|
||||||
@ -103,31 +107,40 @@ function Section(parentSection, id, name) {
|
|||||||
test = this.tests[i];
|
test = this.tests[i];
|
||||||
html += "<tr><td>" + test.id + "</td>" +
|
html += "<tr><td>" + test.id + "</td>" +
|
||||||
"<td>" + test.description + "</td>" +
|
"<td>" + test.description + "</td>" +
|
||||||
"<td><a class='showSource' href='#" + test.id + "'>[source]</a></td>" +
|
"<td><a class='showSource' href='#" + test.id +
|
||||||
"<td class='" + test.result + "'>" + test.result + "</td></tr>"
|
"'>[source]</a></td>" +
|
||||||
|
"<td class='" + test.result + "'>" + test.result +
|
||||||
|
"</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var sectionId in this.subsections) {
|
for(var sectionId in this.subsections) {
|
||||||
var section = this.subsections[sectionId];
|
var section = this.subsections[sectionId];
|
||||||
|
|
||||||
if(section.totalTests > 0) {
|
if(section.totalTests > 0) {
|
||||||
if(options.renderSubsections) {
|
if(options.renderSubsections) {
|
||||||
html += section.toHTML({header: true, renderSubsections: false})
|
html += section.toHTML({
|
||||||
|
header: true,
|
||||||
|
renderSubsections: false});
|
||||||
} else {
|
} else {
|
||||||
html += "<tr><td colspan='3'><a class='section' href='#" + section.id + "'>Chapter " + section.id + " - " + section.name + "</a></td>" +
|
html += "<tr><td colspan='3'><a class='section' href='#" +
|
||||||
"<td class='" + rollupCellClass(section.passPercent()) + "'>" + section.passPercent() + "%</td></tr>";
|
section.id + "'>Chapter " + section.id + " - " +
|
||||||
|
section.name + "</a></td>" +
|
||||||
|
"<td class='" +
|
||||||
|
rollupCellClass(section.passPercent()) + "'>" +
|
||||||
|
section.passPercent() + "%</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return html + "</tbody>";
|
return html + "</tbody>";
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Render this section as XML. Used for the report page. */
|
/* Render this section as XML. Used for the report page. */
|
||||||
this.toXML = function() {
|
this.toXML = function() {
|
||||||
var xml = "";
|
var xml = "";
|
||||||
if(this.id != 0) {
|
if(this.id != 0) {
|
||||||
xml += "<section id='" + this.id + "' name='" + this.name + "'>\r\n";
|
xml += "<section id='" + this.id + "' name='" + this.name +
|
||||||
|
"'>\r\n";
|
||||||
|
|
||||||
for (var i = 0; i < this.tests.length; i++) {
|
for (var i = 0; i < this.tests.length; i++) {
|
||||||
xml += '<test>\r\n' +
|
xml += '<test>\r\n' +
|
||||||
@ -146,7 +159,7 @@ function Section(parentSection, id, name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return xml;
|
return xml;
|
||||||
}
|
};
|
||||||
|
|
||||||
/* Reset counts and remove tests. */
|
/* Reset counts and remove tests. */
|
||||||
this.reset = function() {
|
this.reset = function() {
|
||||||
@ -159,5 +172,5 @@ function Section(parentSection, id, name) {
|
|||||||
for(var subsection in this.subsections) {
|
for(var subsection in this.subsections) {
|
||||||
this.subsections[subsection].reset();
|
this.subsections[subsection].reset();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,8 @@ function $FAIL(message) {
|
|||||||
|
|
||||||
|
|
||||||
//Sputnik library definitions
|
//Sputnik library definitions
|
||||||
//Ultimately these should be namespaced some how and only made available to tests that explicitly include them.
|
//Ultimately these should be namespaced some how and only made
|
||||||
|
//available to tests that explicitly include them.
|
||||||
//For now, we just define the globally
|
//For now, we just define the globally
|
||||||
|
|
||||||
//math_precision.js
|
//math_precision.js
|
||||||
@ -435,12 +436,14 @@ function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
|||||||
* 5. If minutes is supplied use ToNumber(minutes); else use 0
|
* 5. If minutes is supplied use ToNumber(minutes); else use 0
|
||||||
* 6. If seconds is supplied use ToNumber(seconds); else use 0
|
* 6. If seconds is supplied use ToNumber(seconds); else use 0
|
||||||
* 7. If ms is supplied use ToNumber(ms); else use 0
|
* 7. If ms is supplied use ToNumber(ms); else use 0
|
||||||
* 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is
|
* 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99,
|
||||||
* 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1)
|
* Result(8) is 1900+ToInteger(Result(1));
|
||||||
|
* otherwise, Result(8) is Result(1)
|
||||||
* 9. Compute MakeDay(Result(8), Result(2), Result(3))
|
* 9. Compute MakeDay(Result(8), Result(2), Result(3))
|
||||||
* 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7))
|
* 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7))
|
||||||
* 11. Compute MakeDate(Result(9), Result(10))
|
* 11. Compute MakeDate(Result(9), Result(10))
|
||||||
* 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11)))
|
* 12. Set the [[Value]] property of the newly constructed object to
|
||||||
|
* TimeClip(UTC(Result(11)))
|
||||||
*/
|
*/
|
||||||
var r1 = Number(year);
|
var r1 = Number(year);
|
||||||
var r2 = Number(month);
|
var r2 = Number(month);
|
||||||
|
@ -130,13 +130,22 @@ function fnSupportsStrict() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//Verify all attributes specified data property of given object: value, writable, enumerable, configurable
|
//Verify all attributes specified data property of given object:
|
||||||
|
//value, writable, enumerable, configurable
|
||||||
//If all attribute values are expected, return true, otherwise, return false
|
//If all attribute values are expected, return true, otherwise, return false
|
||||||
function dataPropertyAttributesAreCorrect(obj, name, value, writable, enumerable, configurable) {
|
function dataPropertyAttributesAreCorrect(obj,
|
||||||
|
name,
|
||||||
|
value,
|
||||||
|
writable,
|
||||||
|
enumerable,
|
||||||
|
configurable) {
|
||||||
var attributesCorrect = true;
|
var attributesCorrect = true;
|
||||||
|
|
||||||
if (obj[name] !== value) {
|
if (obj[name] !== value) {
|
||||||
if (typeof obj[name] === "number" && isNaN(obj[name]) && typeof value === "number" && isNaN(value)) {
|
if (typeof obj[name] === "number" &&
|
||||||
|
isNaN(obj[name]) &&
|
||||||
|
typeof value === "number" &&
|
||||||
|
isNaN(value)) {
|
||||||
// keep empty
|
// keep empty
|
||||||
} else {
|
} else {
|
||||||
attributesCorrect = false;
|
attributesCorrect = false;
|
||||||
@ -154,7 +163,10 @@ function dataPropertyAttributesAreCorrect(obj, name, value, writable, enumerable
|
|||||||
|
|
||||||
var overwrited = false;
|
var overwrited = false;
|
||||||
if (obj[name] !== value) {
|
if (obj[name] !== value) {
|
||||||
if (typeof obj[name] === "number" && isNaN(obj[name]) && typeof value === "number" && isNaN(value)) {
|
if (typeof obj[name] === "number" &&
|
||||||
|
isNaN(obj[name]) &&
|
||||||
|
typeof value === "number" &&
|
||||||
|
isNaN(value)) {
|
||||||
// keep empty
|
// keep empty
|
||||||
} else {
|
} else {
|
||||||
overwrited = true;
|
overwrited = true;
|
||||||
@ -193,14 +205,24 @@ function dataPropertyAttributesAreCorrect(obj, name, value, writable, enumerable
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//Verify all attributes specified accessor property of given object: get, set, enumerable, configurable
|
//Verify all attributes specified accessor property of given object:
|
||||||
|
//get, set, enumerable, configurable
|
||||||
//If all attribute values are expected, return true, otherwise, return false
|
//If all attribute values are expected, return true, otherwise, return false
|
||||||
function accessorPropertyAttributesAreCorrect(obj, name, get, set, setVerifyHelpProp, enumerable, configurable) {
|
function accessorPropertyAttributesAreCorrect(obj,
|
||||||
|
name,
|
||||||
|
get,
|
||||||
|
set,
|
||||||
|
setVerifyHelpProp,
|
||||||
|
enumerable,
|
||||||
|
configurable) {
|
||||||
var attributesCorrect = true;
|
var attributesCorrect = true;
|
||||||
|
|
||||||
if (get !== undefined) {
|
if (get !== undefined) {
|
||||||
if (obj[name] !== get()) {
|
if (obj[name] !== get()) {
|
||||||
if (typeof obj[name] === "number" && isNaN(obj[name]) && typeof get() === "number" && isNaN(get())) {
|
if (typeof obj[name] === "number" &&
|
||||||
|
isNaN(obj[name]) &&
|
||||||
|
typeof get() === "number" &&
|
||||||
|
isNaN(get())) {
|
||||||
// keep empty
|
// keep empty
|
||||||
} else {
|
} else {
|
||||||
attributesCorrect = false;
|
attributesCorrect = false;
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
//Do not cache any JSON files - see https://bugs.ecmascript.org/show_bug.cgi?id=87
|
// Do not cache any JSON files - see
|
||||||
|
// https://bugs.ecmascript.org/show_bug.cgi?id=87
|
||||||
$.ajaxSetup( {cache:false});
|
$.ajaxSetup( {cache:false});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -28,7 +29,8 @@ $.ajaxSetup( {cache:false});
|
|||||||
* * run(id, test): Runs the test specified.
|
* * run(id, test): Runs the test specified.
|
||||||
*
|
*
|
||||||
* Callbacks:
|
* Callbacks:
|
||||||
* * onComplete(test): Called when the test is run. Test object contains result and error strings describing how the
|
* * onComplete(test): Called when the test is run. Test object
|
||||||
|
* contains result and error strings describing how the
|
||||||
* test ran.
|
* test ran.
|
||||||
*/
|
*/
|
||||||
function BrowserRunner() {
|
function BrowserRunner() {
|
||||||
@ -56,13 +58,15 @@ function BrowserRunner() {
|
|||||||
success: function(data){globalScopeContents = data;},
|
success: function(data){globalScopeContents = data;},
|
||||||
url:harnessDir+"gs.js"});
|
url:harnessDir+"gs.js"});
|
||||||
|
|
||||||
/* Called by the child window to notify that the test has finished. This function call is put in a separate script
|
/* Called by the child window to notify that the test has
|
||||||
* block at the end of the page so errors in the test script block should not prevent this function from being
|
* finished. This function call is put in a separate script block
|
||||||
* called.
|
* at the end of the page so errors in the test script block
|
||||||
|
* should not prevent this function from being called.
|
||||||
*/
|
*/
|
||||||
function testFinished() {
|
function testFinished() {
|
||||||
if((typeof currentTest.result) === "undefined") {
|
if((typeof currentTest.result) === "undefined") {
|
||||||
// We didn't get a call to testRun, which likely means the test failed to load.
|
// We didn't get a call to testRun, which likely means the
|
||||||
|
// test failed to load.
|
||||||
currentTest.result = "fail";
|
currentTest.result = "fail";
|
||||||
currentTest.error = "Failed to load test case (probable parse error).";
|
currentTest.error = "Failed to load test case (probable parse error).";
|
||||||
currentTest.description = "Failed to load test case!";
|
currentTest.description = "Failed to load test case!";
|
||||||
@ -130,11 +134,13 @@ function BrowserRunner() {
|
|||||||
iwin.$INCLUDE = function() {};
|
iwin.$INCLUDE = function() {};
|
||||||
|
|
||||||
if(includes !== null) {
|
if(includes !== null) {
|
||||||
// We have some includes, so loop through each include and pull in the dependencies.
|
// We have some includes, so loop through each include and
|
||||||
|
// pull in the dependencies.
|
||||||
for(var i = 0; i < includes.length; i++) {
|
for(var i = 0; i < includes.length; i++) {
|
||||||
include = includes[i].replace(/.*\(('|")(.*)('|")\)/, "$2");
|
include = includes[i].replace(/.*\(('|")(.*)('|")\)/, "$2");
|
||||||
|
|
||||||
// First check to see if we have this script cached already, and if not, grab it.
|
// First check to see if we have this script cached
|
||||||
|
// already, and if not, grab it.
|
||||||
if(typeof scriptCache[include] === "undefined") {
|
if(typeof scriptCache[include] === "undefined") {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: false,
|
async: false,
|
||||||
@ -212,7 +218,8 @@ function BrowserRunner() {
|
|||||||
* Callbacks:
|
* Callbacks:
|
||||||
* * onLoadingNextSection(path): Called after a request is sent for the next section json, with the path to that json.
|
* * onLoadingNextSection(path): Called after a request is sent for the next section json, with the path to that json.
|
||||||
* * onInitialized(totalTests, version, date): Called after the testcases.json is loaded and parsed.
|
* * onInitialized(totalTests, version, date): Called after the testcases.json is loaded and parsed.
|
||||||
* * onTestReady(id, code): Called when a test is ready with the test's id and code.
|
* * onTestReady(id, code): Called when a test is ready with the
|
||||||
|
* test's id and code.
|
||||||
* * onTestsExhausted(): Called when there are no more tests to run.
|
* * onTestsExhausted(): Called when there are no more tests to run.
|
||||||
*/
|
*/
|
||||||
function TestLoader() {
|
function TestLoader() {
|
||||||
@ -265,7 +272,9 @@ function TestLoader() {
|
|||||||
tests: []
|
tests: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
loader.onInitialized(loader.totalTests, loader.version, loader.date);
|
loader.onInitialized(loader.totalTests,
|
||||||
|
loader.version,
|
||||||
|
loader.date);
|
||||||
getNextXML();
|
getNextXML();
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
@ -279,11 +288,13 @@ function TestLoader() {
|
|||||||
// We have tests left in this test group.
|
// We have tests left in this test group.
|
||||||
var test = testGroups[testGroupIndex].tests[currentTestIndex++];
|
var test = testGroups[testGroupIndex].tests[currentTestIndex++];
|
||||||
var scriptCode = test.code;
|
var scriptCode = test.code;
|
||||||
//var scriptCode = (test.firstChild.text != undefined) ? test.firstChild.text : test.firstChild.textContent;
|
//var scriptCode = (test.firstChild.text != undefined) ?
|
||||||
|
// test.firstChild.text : test.firstChild.textContent;
|
||||||
|
|
||||||
loader.onTestReady(test, $.base64Decode(scriptCode));
|
loader.onTestReady(test, $.base64Decode(scriptCode));
|
||||||
} else if(testGroupIndex < testGroups.length - 1) {
|
} else if(testGroupIndex < testGroups.length - 1) {
|
||||||
// We don't have tests left in this test group, so move on to the next.
|
// We don't have tests left in this test group, so move on
|
||||||
|
// to the next.
|
||||||
testGroupIndex++;
|
testGroupIndex++;
|
||||||
getNextXML();
|
getNextXML();
|
||||||
} else {
|
} else {
|
||||||
@ -406,9 +417,11 @@ function isSiteDebugMode() {
|
|||||||
$(function () {
|
$(function () {
|
||||||
presenter.setup();
|
presenter.setup();
|
||||||
$('.content-home').show();
|
$('.content-home').show();
|
||||||
// Adding attribute to the tabs (e.g. Home, Run etc.) and attaching the click event on buttons (e.g. Reset, Start etc.)
|
// Adding attribute to the tabs (e.g. Home, Run etc.) and
|
||||||
|
// attaching the click event on buttons (e.g. Reset, Start etc.)
|
||||||
$('.nav-link').each(function (index) {
|
$('.nav-link').each(function (index) {
|
||||||
//Adding "targetDiv" attribute to the header tab and on that basis the div related to header tabs are displayed
|
//Adding "targetDiv" attribute to the header tab and on that
|
||||||
|
//basis the div related to header tabs are displayed
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
$(this).attr('targetDiv', '.content-home');
|
$(this).attr('targetDiv', '.content-home');
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
@ -423,7 +436,8 @@ $(function () {
|
|||||||
$(this).attr('targetDiv', '.content-browsers');
|
$(this).attr('targetDiv', '.content-browsers');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Attaching the click event to the header tab that shows the respective div of header
|
//Attaching the click event to the header tab that shows the
|
||||||
|
//respective div of header
|
||||||
$(this).click(function () {
|
$(this).click(function () {
|
||||||
var target = $(this).attr('targetDiv');
|
var target = $(this).attr('targetDiv');
|
||||||
$('#contentContainer > div:visible').hide();
|
$('#contentContainer > div:visible').hide();
|
||||||
@ -438,12 +452,14 @@ $(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//Attach the click event to the start button. It starts, stops and pauses the tests
|
//Attach the click event to the start button. It starts, stops and
|
||||||
|
//pauses the tests
|
||||||
$('.button-start').click(function () {
|
$('.button-start').click(function () {
|
||||||
controller.toggle();
|
controller.toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Attach the click event to the reset button. It reset all the test to zero
|
//Attach the click event to the reset button. It reset all the
|
||||||
|
//test to zero
|
||||||
$('.button-reset').click(function () {
|
$('.button-reset').click(function () {
|
||||||
controller.reset();
|
controller.reset();
|
||||||
});
|
});
|
||||||
|
@ -1 +1 @@
|
|||||||
{"date":"2011-09-12","numTests":10978,"testSuite":["resources/scripts/testcases/07_Lexical_Conventions.json","resources/scripts/testcases/08_Types.json","resources/scripts/testcases/09_Type_Conversion.json","resources/scripts/testcases/10_Execution_Contexts.json","resources/scripts/testcases/11.10_Binary_Bitwise_Operators.json","resources/scripts/testcases/11.11_Binary_Logical_Operators.json","resources/scripts/testcases/11.12_Conditional_Operator.json","resources/scripts/testcases/11.13_Assignment_Operators.json","resources/scripts/testcases/11.14_Comma_Operator.json","resources/scripts/testcases/11.1_Primary_Expressions.json","resources/scripts/testcases/11.2_Left_Hand_Side_Expressions.json","resources/scripts/testcases/11.3_PostfixExpressions.json","resources/scripts/testcases/11.4_Unary_Operators.json","resources/scripts/testcases/11.5_Multiplicative_Operators.json","resources/scripts/testcases/11.6_Additive_Operators.json","resources/scripts/testcases/11.7_Bitwise_Shift_Operators.json","resources/scripts/testcases/11.8_Relational_Operators.json","resources/scripts/testcases/11.9_Equality_Operators.json","resources/scripts/testcases/12_Statement.json","resources/scripts/testcases/13_Function_Definition.json","resources/scripts/testcases/14_Program.json","resources/scripts/testcases/15.10_RegExp_Objects.json","resources/scripts/testcases/15.11_Error_Objects.json","resources/scripts/testcases/15.12_The_JSON_Object.json","resources/scripts/testcases/15.1_The_Global_Object.json","resources/scripts/testcases/15.2_Object_Objects.json","resources/scripts/testcases/15.3_Function_Objects.json","resources/scripts/testcases/15.4_Array_Objects.json","resources/scripts/testcases/15.5_String_Objects.json","resources/scripts/testcases/15.6_Boolean_Objects.json","resources/scripts/testcases/15.7_Number_Objects.json","resources/scripts/testcases/15.8_The_Math_Object.json","resources/scripts/testcases/15.9_Date_Objects.json","resources/scripts/testcases/chapter07.json","resources/scripts/testcases/chapter08.json","resources/scripts/testcases/chapter10.json","resources/scripts/testcases/chapter11.json","resources/scripts/testcases/chapter12.json","resources/scripts/testcases/chapter13.json","resources/scripts/testcases/chapter14.json","resources/scripts/testcases/15.1.json","resources/scripts/testcases/15.10.json","resources/scripts/testcases/15.11.json","resources/scripts/testcases/15.12.json","resources/scripts/testcases/15.2.3.1.json","resources/scripts/testcases/15.2.3.10.json","resources/scripts/testcases/15.2.3.11.json","resources/scripts/testcases/15.2.3.12.json","resources/scripts/testcases/15.2.3.13.json","resources/scripts/testcases/15.2.3.14.json","resources/scripts/testcases/15.2.3.2.json","resources/scripts/testcases/15.2.3.3.json","resources/scripts/testcases/15.2.3.4.json","resources/scripts/testcases/15.2.3.5.json","resources/scripts/testcases/15.2.3.6.json","resources/scripts/testcases/15.2.3.7.json","resources/scripts/testcases/15.2.3.8.json","resources/scripts/testcases/15.2.3.9.json","resources/scripts/testcases/15.2.4.json","resources/scripts/testcases/15.3.json","resources/scripts/testcases/15.4.3.json","resources/scripts/testcases/15.4.4.10.json","resources/scripts/testcases/15.4.4.12.json","resources/scripts/testcases/15.4.4.14.json","resources/scripts/testcases/15.4.4.15.json","resources/scripts/testcases/15.4.4.16.json","resources/scripts/testcases/15.4.4.17.json","resources/scripts/testcases/15.4.4.18.json","resources/scripts/testcases/15.4.4.19.json","resources/scripts/testcases/15.4.4.20.json","resources/scripts/testcases/15.4.4.21.json","resources/scripts/testcases/15.4.4.22.json","resources/scripts/testcases/15.4.4.4.json","resources/scripts/testcases/15.4.5.json","resources/scripts/testcases/15.5.json","resources/scripts/testcases/15.7.json","resources/scripts/testcases/15.9.json"],"version":"ES5"}
|
{"date":"2011-09-13","numTests":10978,"testSuite":["resources/scripts/testcases/07_Lexical_Conventions.json","resources/scripts/testcases/08_Types.json","resources/scripts/testcases/09_Type_Conversion.json","resources/scripts/testcases/10_Execution_Contexts.json","resources/scripts/testcases/11.10_Binary_Bitwise_Operators.json","resources/scripts/testcases/11.11_Binary_Logical_Operators.json","resources/scripts/testcases/11.12_Conditional_Operator.json","resources/scripts/testcases/11.13_Assignment_Operators.json","resources/scripts/testcases/11.14_Comma_Operator.json","resources/scripts/testcases/11.1_Primary_Expressions.json","resources/scripts/testcases/11.2_Left_Hand_Side_Expressions.json","resources/scripts/testcases/11.3_PostfixExpressions.json","resources/scripts/testcases/11.4_Unary_Operators.json","resources/scripts/testcases/11.5_Multiplicative_Operators.json","resources/scripts/testcases/11.6_Additive_Operators.json","resources/scripts/testcases/11.7_Bitwise_Shift_Operators.json","resources/scripts/testcases/11.8_Relational_Operators.json","resources/scripts/testcases/11.9_Equality_Operators.json","resources/scripts/testcases/12_Statement.json","resources/scripts/testcases/13_Function_Definition.json","resources/scripts/testcases/14_Program.json","resources/scripts/testcases/15.10_RegExp_Objects.json","resources/scripts/testcases/15.11_Error_Objects.json","resources/scripts/testcases/15.12_The_JSON_Object.json","resources/scripts/testcases/15.1_The_Global_Object.json","resources/scripts/testcases/15.2_Object_Objects.json","resources/scripts/testcases/15.3_Function_Objects.json","resources/scripts/testcases/15.4_Array_Objects.json","resources/scripts/testcases/15.5_String_Objects.json","resources/scripts/testcases/15.6_Boolean_Objects.json","resources/scripts/testcases/15.7_Number_Objects.json","resources/scripts/testcases/15.8_The_Math_Object.json","resources/scripts/testcases/15.9_Date_Objects.json","resources/scripts/testcases/chapter07.json","resources/scripts/testcases/chapter08.json","resources/scripts/testcases/chapter10.json","resources/scripts/testcases/chapter11.json","resources/scripts/testcases/chapter12.json","resources/scripts/testcases/chapter13.json","resources/scripts/testcases/chapter14.json","resources/scripts/testcases/15.1.json","resources/scripts/testcases/15.10.json","resources/scripts/testcases/15.11.json","resources/scripts/testcases/15.12.json","resources/scripts/testcases/15.2.3.1.json","resources/scripts/testcases/15.2.3.10.json","resources/scripts/testcases/15.2.3.11.json","resources/scripts/testcases/15.2.3.12.json","resources/scripts/testcases/15.2.3.13.json","resources/scripts/testcases/15.2.3.14.json","resources/scripts/testcases/15.2.3.2.json","resources/scripts/testcases/15.2.3.3.json","resources/scripts/testcases/15.2.3.4.json","resources/scripts/testcases/15.2.3.5.json","resources/scripts/testcases/15.2.3.6.json","resources/scripts/testcases/15.2.3.7.json","resources/scripts/testcases/15.2.3.8.json","resources/scripts/testcases/15.2.3.9.json","resources/scripts/testcases/15.2.4.json","resources/scripts/testcases/15.3.json","resources/scripts/testcases/15.4.3.json","resources/scripts/testcases/15.4.4.10.json","resources/scripts/testcases/15.4.4.12.json","resources/scripts/testcases/15.4.4.14.json","resources/scripts/testcases/15.4.4.15.json","resources/scripts/testcases/15.4.4.16.json","resources/scripts/testcases/15.4.4.17.json","resources/scripts/testcases/15.4.4.18.json","resources/scripts/testcases/15.4.4.19.json","resources/scripts/testcases/15.4.4.20.json","resources/scripts/testcases/15.4.4.21.json","resources/scripts/testcases/15.4.4.22.json","resources/scripts/testcases/15.4.4.4.json","resources/scripts/testcases/15.4.5.json","resources/scripts/testcases/15.5.json","resources/scripts/testcases/15.7.json","resources/scripts/testcases/15.9.json"],"version":"ES5"}
|
Loading…
x
Reference in New Issue
Block a user