diff --git a/tools/TestCaseHTMLPackager/excludelist.xml b/tools/TestCaseHTMLPackager/excludelist.xml index 8f08970986..a112ee7093 100644 --- a/tools/TestCaseHTMLPackager/excludelist.xml +++ b/tools/TestCaseHTMLPackager/excludelist.xml @@ -111,12 +111,6 @@ - - problem, should be replaced or run in an iframe - - - problem, should be replaced or run in an iframe - problem, should replace with different test @@ -132,9 +126,6 @@ problem, bad test should be rewritten - - deletes function.tostring() function so [source] window does not work - problem, bad test should be rewritten @@ -216,266 +207,89 @@ problem, syntax validation needs to use eval. revised - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes Date.prototype.getFullYear + + Uses this. - - problem, deletes Date.prototype.getUTCFullYear + + Uses this. - - problem, deletes Date.prototype.getMonth + + Uses this. - - problem, deletes Date.prototype.getUTCMonth + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh + + Uses this. - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, deletes built-in methodh - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes Date.prototype.getFullYear - - - problem, over-writes Date.prototype.getUTCFullYear - - - problem, over-writes Date.prototype.getMonth - - - problem, over-writes Date.prototype.getUTCMonth - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method - - - problem, over-writes built-in method + + Uses this. + Used this + Used this + Used this + Used this + Using this pointer + Using this pointer, intented for Global object + - diff --git a/website/default.html b/website/default.html index a78cbb706a..ddd26bdec1 100644 --- a/website/default.html +++ b/website/default.html @@ -2,9 +2,9 @@ + - @@ -175,4 +175,4 @@ - \ No newline at end of file + diff --git a/website/resources/scripts/global/Date_constants.js b/website/resources/scripts/global/Date_constants.js new file mode 100644 index 0000000000..e69ecbf6a5 --- /dev/null +++ b/website/resources/scripts/global/Date_constants.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; + +var msPerDay = 86400000; +var msPerSecond = 1000; +var msPerMinute = 60000; +var msPerHour = 3600000; + +var date_1899_end = -2208988800001; +var date_1900_start = -2208988800000; +var date_1969_end = -1; +var date_1970_start = 0; +var date_1999_end = 946684799999; +var date_2000_start = 946684800000; +var date_2099_end = 4102444799999; +var date_2100_start = 4102444800000; diff --git a/website/resources/scripts/global/Date_library.js b/website/resources/scripts/global/Date_library.js new file mode 100644 index 0000000000..84fae35aff --- /dev/null +++ b/website/resources/scripts/global/Date_library.js @@ -0,0 +1,341 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//15.9.1.2 Day Number and Time within Day +function Day(t) { + return Math.floor(t/msPerDay); +} + +function TimeWithinDay(t) { + return t%msPerDay; +} + +//15.9.1.3 Year Number +function DaysInYear(y){ + if(y%4 != 0) return 365; + if(y%4 == 0 && y%100 != 0) return 366; + if(y%100 == 0 && y%400 != 0) return 365; + if(y%400 == 0) return 366; +} + +function DayFromYear(y) { + return (365*(y-1970) + + Math.floor((y-1969)/4) + - Math.floor((y-1901)/100) + + Math.floor((y-1601)/400)); +} + +function TimeFromYear(y){ + return msPerDay*DayFromYear(y); +} + +function YearFromTime(t) { + t = Number(t); + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + + for(var time = 0;;year += sign){ + time = TimeFromYear(year); + + if(sign > 0 && time > t){ + year -= sign; + break; + } + else if(sign < 0 && time <= t){ + break; + } + }; + return year; +} + +function InLeapYear(t){ + if(DaysInYear(YearFromTime(t)) == 365) + return 0; + + if(DaysInYear(YearFromTime(t)) == 366) + return 1; +} + +function DayWithinYear(t) { + return Day(t)-DayFromYear(YearFromTime(t)); +} + +//15.9.1.4 Month Number +function MonthFromTime(t){ + var day = DayWithinYear(t); + var leap = InLeapYear(t); + + if((0 <= day) && (day < 31)) return 0; + if((31 <= day) && (day < (59+leap))) return 1; + if(((59+leap) <= day) && (day < (90+leap))) return 2; + if(((90+leap) <= day) && (day < (120+leap))) return 3; + if(((120+leap) <= day) && (day < (151+leap))) return 4; + if(((151+leap) <= day) && (day < (181+leap))) return 5; + if(((181+leap) <= day) && (day < (212+leap))) return 6; + if(((212+leap) <= day) && (day < (243+leap))) return 7; + if(((243+leap) <= day) && (day < (273+leap))) return 8; + if(((273+leap) <= day) && (day < (304+leap))) return 9; + if(((304+leap) <= day) && (day < (334+leap))) return 10; + if(((334+leap) <= day) && (day < (365+leap))) return 11; +} + +//15.9.1.5 Date Number +function DateFromTime(t) { + var day = DayWithinYear(t); + var month = MonthFromTime(t); + var leap = InLeapYear(t); + + if(month == 0) return day+1; + if(month == 1) return day-30; + if(month == 2) return day-58-leap; + if(month == 3) return day-89-leap; + if(month == 4) return day-119-leap; + if(month == 5) return day-150-leap; + if(month == 6) return day-180-leap; + if(month == 7) return day-211-leap; + if(month == 8) return day-242-leap; + if(month == 9) return day-272-leap; + if(month == 10) return day-303-leap; + if(month == 11) return day-333-leap; +} + +//15.9.1.6 Week Day +function WeekDay(t) { + var weekday = (Day(t)+4)%7; + return (weekday < 0 ? 7+weekday : weekday); +} + +//15.9.1.9 Daylight Saving Time Adjustment +var LocalTZA = $LocalTZ*msPerHour; + +function DaysInMonth(m, leap) { + m = m%12; + + //April, June, Sept, Nov + if(m == 3 || m == 5 || m == 8 || m == 10 ) { + return 30; + } + + //Jan, March, May, July, Aug, Oct, Dec + if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ + return 31; + } + + //Feb + return 28+leap; +} + +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var leap = InLeapYear(t); + var day = 0; + + if(m >= 1) day += DaysInMonth(0, leap); + if(m >= 2) day += DaysInMonth(1, leap); + if(m >= 3) day += DaysInMonth(2, leap); + if(m >= 4) day += DaysInMonth(3, leap); + if(m >= 5) day += DaysInMonth(4, leap); + if(m >= 6) day += DaysInMonth(5, leap); + if(m >= 7) day += DaysInMonth(6, leap); + if(m >= 8) day += DaysInMonth(7, leap); + if(m >= 9) day += DaysInMonth(8, leap); + if(m >= 10) day += DaysInMonth(9, leap); + if(m >= 11) day += DaysInMonth(10, leap); + + var month_start = TimeFromYear(year)+day*msPerDay; + var sunday = 0; + + if(count === "last"){ + for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; + WeekDay(last_sunday)>0; + last_sunday -= msPerDay + ){}; + sunday = last_sunday; + } + else { + for(var first_sunday = month_start; + WeekDay(first_sunday)>0; + first_sunday += msPerDay + ){}; + sunday = first_sunday+7*msPerDay*(count-1); + } + + return sunday; +} + +function DaylightSavingTA(t) { + t = t-LocalTZA; + + var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + +$DST_start_hour*msPerHour + +$DST_start_minutes*msPerMinute; + + var k = new Date(DST_start); + + var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + +$DST_end_hour*msPerHour + +$DST_end_minutes*msPerMinute; + + if ( t >= DST_start && t < DST_end ) { + return msPerHour; + } else { + return 0; + } +} + +//15.9.1.9 Local Time +function LocalTime(t){ + return t+LocalTZA+DaylightSavingTA(t); +} + +function UTC(t) { + return t-LocalTZA-DaylightSavingTA(t-LocalTZA); +} + +//15.9.1.10 Hours, Minutes, Second, and Milliseconds +function HourFromTime(t){ + return Math.floor(t/msPerHour)%HoursPerDay; +} + +function MinFromTime(t){ + return Math.floor(t/msPerMinute)%MinutesPerHour; +} + +function SecFromTime(t){ + return Math.floor(t/msPerSecond)%SecondsPerMinute; +} + +function msFromTime(t){ + return t%msPerSecond; +} + +//15.9.1.11 MakeTime (hour, min, sec, ms) +function MakeTime(hour, min, sec, ms){ + if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { + return Number.NaN; + } + + hour = ToInteger(hour); + min = ToInteger(min); + sec = ToInteger(sec); + ms = ToInteger(ms); + + return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); +} + +//15.9.1.12 MakeDay (year, month, date) +function MakeDay(year, month, date) { + if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { + return Number.NaN; + } + + year = ToInteger(year); + month = ToInteger(month); + date = ToInteger(date ); + + var result5 = year + Math.floor(month/12); + var result6 = month%12; + + var sign = ( year < 1970 ) ? -1 : 1; + var t = ( year < 1970 ) ? 1 : 0; + var y = ( year < 1970 ) ? 1969 : 1970; + + if( sign == -1 ){ + for ( y = 1969; y >= year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } else { + for ( y = 1970 ; y < year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } + + var leap = 0; + for ( var m = 0; m < month; m++ ) { + //if year is changed, than we need to recalculate leep + leap = InLeapYear(t); + t += DaysInMonth(m, leap)*msPerDay; + } + + if ( YearFromTime(t) != result5 ) { + return Number.NaN; + } + if ( MonthFromTime(t) != result6 ) { + return Number.NaN; + } + if ( DateFromTime(t) != 1 ) { + return Number.NaN; + } + + return Day(t)+date-1; +} + +//15.9.1.13 MakeDate (day, time) +function MakeDate( day, time ) { + if(!isFinite(day) || !isFinite(time)) { + return Number.NaN; + } + + return day*msPerDay+time; +} + +//15.9.1.14 TimeClip (time) +function TimeClip(time) { + if(!isFinite(time) || Math.abs(time) > 8.64e15){ + return Number.NaN; + } + + return ToInteger(time); +} + +//Test Functions +function ConstructDate(year, month, date, hours, minutes, seconds, ms){ + /* + * 1. Call ToNumber(year) + * 2. Call ToNumber(month) + * 3. If date is supplied use ToNumber(date); else use 1 + * 4. If hours is supplied use ToNumber(hours); 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 + * 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 + * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + * 9. Compute MakeDay(Result(8), Result(2), Result(3)) + * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + * 11. Compute MakeDate(Result(9), Result(10)) + * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) + */ + var r1 = Number(year); + var r2 = Number(month); + var r3 = ((date && arguments.length > 2) ? Number(date) : 1); + var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); + var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); + var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); + var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); + + var r8 = r1; + + if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) + r8 = 1900+r1; + + var r9 = MakeDay(r8, r2, r3); + var r10 = MakeTime(r4, r5, r6, r7); + var r11 = MakeDate(r9, r10); + + return TimeClip(UTC(r11)); +} + + +//the following values are normally generated by the sputnik.py driver +// for now, we'll just use 0 for everything +/* +var $LocalTZ=-8; +var $DST_start_month=2; +var $DST_start_sunday='first'; +var $DST_start_hour=2; +var $DST_start_minutes=0; +var $DST_end_month=10; +var $DST_end_sunday='first'; +var $DST_end_hour=2; +var $DST_end_minutes=0; +*/ diff --git a/website/resources/scripts/global/environment.js b/website/resources/scripts/global/environment.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/website/resources/scripts/global/helper.js b/website/resources/scripts/global/helper.js index ba4892687a..d8b36f74bd 100644 --- a/website/resources/scripts/global/helper.js +++ b/website/resources/scripts/global/helper.js @@ -1,226 +1,158 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * 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. +/// * 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. +/// +/// 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 +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// 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, +/// 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. -$(function () { - pageHelper.init(); - $('.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.) - $('.nav-link').each(function (index) { - //Adding "targetDiv" attribute to the header tab and on that basis the div related to header tabs are displayed - if (index === 0) { - $(this).attr('targetDiv', '.content-home'); - } else if (index === 1) { - $(this).attr('targetDiv', '.content-tests'); - } else if (index === 2) { - $(this).attr('targetDiv', '.content-results'); - $(this).attr('testRunning', 'false'); - } else if (index === 3) { - $(this).attr('targetDiv', '.content-dev'); - } - else { - $(this).attr('targetDiv', '.content-browsers'); - } +/* Handles updating the page with information from the runner. */ +function Presenter() { + var altStyle = '', + logger, + progressBar, + date, + version, + table, + backLink, - //Attaching the click event to the header tab that shows the respective div of header - $(this).click(function () { - var target = $(this).attr('targetDiv'); - //If clicked tab is Result, it generates the results. - if ($(target).hasClass('content-results')) { - if ($(this).attr('testRunning') === 'true') { return; } - pageHelper.generateReportTable(); - } - $('#contentContainer > div:visible').hide(); - $('.navBar .selected').toggleClass('selected'); - $(this).addClass('selected'); - $(target).show(); - //If clicked tab is Browsers Report, it shows the reports - if (target === '.content-browsers') { - $("body").addClass("busy"); - setTimeout(function () { - buildTable(); - }, 500); - } - }); - }); + globalSection = new Section(null, "0", "ECMA-262"), + currentSection = globalSection, + tests = {}, + totalTests = 0; - //Attach the click event to the start button. It starts, stops and pauses the tests - $('.button-start').click(function () { - $('#testsToRun').text(ES5Harness.getTotalTestsToRun()); - $('#totalCounter').text(0); - $('#Pass').text(0); - $('#Fail').text(0); - $('#totalFailedCounter').text(0); - $('#failedToLoadCounter1').text(0); - $('#failedToLoadCounter').text(0); - //It stores the state of the test case in the data of button, whether running, paused or stopped. That is used later to get the present state - var testStatus = $(this).data('testStatus'); + TOCFILEPATH = "resources/scripts/global/ecma-262-toc.xml"; - switch (testStatus) { - case undefined: - case "stopped": - ES5Harness.stop("stopped"); - pageHelper.logger.find('tr').remove(); - if (!ES5Harness.setChapter(pageHelper.update)) { - return false; - } - $(this).data('testStatus', "running"); - ES5Harness.startTesting(pageHelper.update, "reset"); - $(this).attr('src', 'resources/images/pause.png'); - pageHelper.configureReportLink(true); - break; - case "running": - $(this).data('testStatus', "paused"); - ES5Harness.stop("paused"); - $(this).attr('src', 'resources/images/resume.png'); - pageHelper.configureReportLink(false); - break; - case "paused": - $(this).data('testStatus', "running"); - $(this).attr('src', 'resources/images/pause.png'); - ES5Harness.startTesting(pageHelper.update, "resume"); - pageHelper.configureReportLink(true); - break; - } - }); + + /* 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; - //Attach the click event to the reset button. It reset all the test to zero - $('.button-reset').click( - /*function () { - pageHelper.configureReportLink(false); - $('.button-start').data('testStatus', "stopped").attr('src', 'resources/images/start.png'); - pageHelper.logger.find('tr').remove(); - ES5Harness.stop("reset"); - ES5Harness.resetSections(); - $('#failedToLoadCounter1').text(0); - $('#failedToLoadCounter').text(0); - $('#totalFailedCounter').text(0); - pageHelper.failedToLoad = 0; - resetResults(); - $('#nextActivity').text(""); - } */ - function () { - location.replace(location.protocol + '//' + location.host + '/default.html?run'); + addSectionsFromXML(nodes, globalSection); } - ); - //Attaching the click event to the "Download results as XML" link - $('#ancGenXMLReport').click(function (e) { - pageHelper.generateReportXml(); - return false; - }); - //load xml testcase path list when page loads - ES5Harness && ES5Harness.loadTestList(); - pageHelper.selectTab(); -}); + /* Recursively parses the TOC xml, producing nested sections. */ + function addSectionsFromXML(nodes, parentSection){ + var subsection; -var pageHelper = { - - //constants - XML_TARGETTESTSUITENAME: 'ECMAScript Test262 Site', - XML_TARGETTESTSUITEVERSION: '', - XML_TARGETTESTSUITEDATE: '', - RED_LIMIT: 50, - YELLOW_LIMIT: 75, - GREEN_LIMIT: 99.9, - - logger: undefined, - loggerParent: undefined, - progressBar: undefined, - failedToLoad: 0, - - init: function () { - this.logger = $('#tableLogger'); - this.loggerParent = this.logger.parent(); - this.progressBar = $('#progressbar'); - this.failedToLoad = 0; - }, - - //It sets the tab on the basis of url e.g. if URL is \default.html?result, Result tab will be selected - selectTab: function () { - var queryStr = location.search.toLowerCase(); - if (queryStr.indexOf("run") > 0) { - $("#run").click(); + 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')); + parentSection.subsections[subsection.id.match(/\d+$/)] = subsection; + addSectionsFromXML(nodes[i].childNodes, subsection); + } } - else if (queryStr.indexOf("result") > 0) { - $("#results").click(); - } - else if (queryStr.indexOf("development") > 0) { - $("#development").click(); - } - else if (queryStr.indexOf("browser") > 0) { - $("#browsers").click(); - } - }, + } - setVersionAndDate: function () { - //Set the version and date - $(".targetTestSuiteVersion").text(pageHelper.XML_TARGETTESTSUITEVERSION); - $(".targetTestSuiteDate").text(pageHelper.XML_TARGETTESTSUITEDATE); - }, - //It sets title to the Results tab when tests are running - configureReportLink: function (executing) { - var reportLink = $('.test-report-link'); - if (executing) { - reportLink.attr('testRunning', 'true'); - reportLink.parent().attr('title', 'Please wait till the test run is completed or stop the test run before viewing the report.'); + /* Renders the current section into the report window. */ + function renderCurrentSection() { + renderBreadcrumbs(); + + if(globalSection.totalTests === 0) { + $('#resultMessage').show(); } else { - reportLink.parent().attr('title', ''); - reportLink.attr('testRunning', 'false'); - } - }, - - //This is used as callback function for passing in sth.js - update: function (detailsObj) { - $('#testsToRun').text(detailsObj.totalTestsToRun); - if (!isNaN(detailsObj.totalTestsRun)) { - $('#totalCounter').text(detailsObj.totalTestsRun); + $('#resultMessage').hide(); } - $('#Pass').text(detailsObj.totalTestsPassed); - $('#Fail').text(detailsObj.totalTestsFailed); - $('#failedToLoadCounter1').text(pageHelper.failedToLoad); - $('#failedToLoadCounter').text(pageHelper.failedToLoad); - $('#nextActivity').text(detailsObj.nextActivity); - if (detailsObj.completed) { - var btnStart = $('#btnStart').attr('src', 'resources/images/start.png'); - btnStart.data('testStatus', "stopped"); - $('#totalFailedCounter').text(pageHelper.failedToLoad); - pageHelper.configureReportLink(false); - $('#nextActivity').text(""); + $('.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); + } + + /* Renders the breadcrumbs for report navigation. */ + function renderBreadcrumbs() { + var container = $('div.crumbContainer div.crumbs'); + var sectionChain = []; + + var current = currentSection; + + // Walk backwards until we reach the global section. + while(current !== globalSection) { + sectionChain.push(current); + current = current.parentSection; } - var altStyle = (pageHelper.logger.children().length % 2) === 0 ? ' ' : 'alternate'; - var appendStr = ''; - var length = 0; - if (detailsObj.failedTestCases && detailsObj.failedTestCases.length > 0) { - length = detailsObj.failedTestCases.length; - var testObj; - while (length--) { - altStyle = (altStyle !== ' ') ? ' ' : 'alternate'; - testObj = detailsObj.failedTestCases.shift(); - appendStr += '' + testObj.id + '' + testObj.description + 'Fail'; - } - pageHelper.logger.append(appendStr); + // Reverse the array since we want to print earlier sections first. + sectionChain.reverse(); + + // Empty any existing breadcrumbs. + container.empty(); + + // Static first link to go back to the root. + var link = $("Test Report > "); + link.bind('click', {sectionId: 0}, sectionSelected) + container.append(link); + + for(var i = 0; i < sectionChain.length;i++) { + link = $("Section " + sectionChain[i].id + ": " + sectionChain[i].name + " > "); + link.bind('click', sectionSelected) + container.append(link); } - var testCasesPaths = this.ES5Harness.getFailToLoad(); - appendStr = ''; - if (testCasesPaths.length > 0) { - length = testCasesPaths.length; - while (length--) { - testObj = testCasesPaths.shift(); - altStyle = (altStyle !== ' ') ? ' ' : 'alternate'; - appendStr += '' + testObj + '' + '' + 'Not Loaded'; - pageHelper.failedToLoad++; - } - pageHelper.logger.append(appendStr); + // If we can go back, show the back link. + if(sectionChain.length > 0) { + backLink.show(); + } else { + backLink.hide(); } - pageHelper.loggerParent.attr("scrollTop", pageHelper.loggerParent.attr("scrollHeight")); - pageHelper.progressBar.reportprogress(detailsObj.totalTestsRun, detailsObj.totalTestCasesForProgressBar); - }, + } - //This is used to generate the xml for the results - generateReportXml: function () { + /* 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 = ''; + + innerHTML += 'Test '; + innerHTML += '' + test.id + '

'; + + if (test.description) { + innerHTML += 'Description'; + innerHTML += '
' + test.description.replace(//g, '>'); +' 
'; + } + + innerHTML += '


Testcase'; + innerHTML += '
' + test.code + '
'; + + if (test.pre) { + innerHTML += 'Precondition'; + innerHTML += '
' + test.pre + '
'; + } + + innerHTML += 'Path'; + innerHTML += '
' + test.path + ' 
 '; + + popWnd.document.write(innerHTML); + } + + /* 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; @@ -233,414 +165,150 @@ var pageHelper = { 'REPLACE WITH BROWSERNAME BEFORE PUSHING TO HG\r\n' + '' + dateNow.toDateString() + '\r\n' + ' ADD SUBMITTER\r\n' + - '' + this.XML_TARGETTESTSUITENAME + '\r\n' + - '' + this.XML_TARGETTESTSUITEVERSION + '\r\n' + - '' + this.XML_TARGETTESTSUITEDATE + '\r\n' + + 'ECMAScript Test262 Site\r\n' + + '' + version + '\r\n' + + '' + date + '\r\n' + ' \r\n\r\n'; reportWindow = window.open(); reportWindow.document.writeln("ECMAScript Test262 XML"); - if (ES5Harness.getTotalTestsRun() !== parseInt(ES5Harness.getTotalTestsToRun())) { - reportWindow.document.writeln("
Test Results file cannot be generated because execution is not completed
"); - - } - else { - reportWindow.document.writeln("

"); - reportWindow.document.write("\r\n'); - reportWindow.document.close(); - } - }, - - htmlEscape: function (str) { - return str.replace(//g, '>'); - }, - - numTests: function (section) { - nTest = 0; - for (var subSectionIndex = 0; subSectionIndex < section.subSections.length; subSectionIndex++) { - if (section.subSections[subSectionIndex].total !== 0) { - nTest++; - } - } - return nTest; - }, - - //It generates the report that is displayed in results tab - generateReportTable: function () { - var bResultsdisplayed = false; - - $('#backlinkDiv').hide(); - //define local scope to sections array - var sections = window.sections; - var dataTable = $('.results-data-table'); - $('.results-data-table').find("tr").remove(); - - //set the total, pass and fail count - $('.totalCases').text(ES5Harness.getTotalTestsRun()); - $('.passedCases').text(ES5Harness.getTotalTestsPassed()); - $('.failedCases').text(ES5Harness.getTotalTestsFailed()); - $('#failedToLoadCounterDetails').text(pageHelper.failedToLoad); - try { - $('.crumbs #link1').remove(); - $('.crumbs #link2').remove(); - $('.crumbs #link3').remove(); - } - catch (e) { - $('.crumbs #link1').text(""); - $('.crumbs #link2').text(""); - $('.crumbs #link3').text(""); - } - - //set the navigation bar - var anc1 = $('Test Report >'); - anc1.attr('href', 'javascript:pageHelper.generateReportTable();'); - $('.crumbs').append(anc1); - $('.crumbs #link1').removeClass().addClass("setBlack"); - - var totalSubSectionPassed = 0; - for (var sectionIndex = 0; sectionIndex < sections.length; sectionIndex++) { - if (pageHelper.numTests(sections[sectionIndex]) !== 0) { - bResultsdisplayed = true; - dataTable.append('' + 'Chapter ' + sections[sectionIndex].id + '- ' + sections[sectionIndex].name + ''); - var mainSectionPercentageStyle = "reportRed"; - // if there are any cases directly inside the chapter instead of in subsections - if (sections[sectionIndex].testCaseArray.length > 0) { - - for (var index = 0; index < sections[sectionIndex].subSections.length; index++) { - totalSubSectionPassed = totalSubSectionPassed + sections[sectionIndex].subSections[index].passed; - } - - var calculatedLimit = (sections[sectionIndex].passed - totalSubSectionPassed) / sections[sectionIndex].testCaseArray.length * 100; - if (calculatedLimit >= pageHelper.GREEN_LIMIT) { - mainSectionPercentageStyle = "reportGreen"; - } - else if (Math.round(calculatedLimit) >= pageHelper.YELLOW_LIMIT) { - mainSectionPercentageStyle = "reportLightGreen"; - } - else if (Math.round(calculatedLimit) >= pageHelper.RED_LIMIT) { - mainSectionPercentageStyle = "reportYellow"; - } - else { - mainSectionPercentageStyle = "reportRed"; - } - - dataTable.append('' + "In Chapter " + sections[sectionIndex].id + '' + (Math.round(calculatedLimit)) + '%' + ''); - } - } - - for (var subSectionIndex = 0; subSectionIndex < sections[sectionIndex].subSections.length; subSectionIndex++) { - var styleClass; - if (sections[sectionIndex].subSections[subSectionIndex].total !== 0) { - - var passedPercentage = 0; - //If there are subsections in subsection along with direct test cases, calculation is done like below - if (sections[sectionIndex].subSections[subSectionIndex].subSections) { - var totalPassedSubSections = sections[sectionIndex].subSections[subSectionIndex].passed; - var totalSubSections = sections[sectionIndex].subSections[subSectionIndex].total; - for (var subSubSectionIndex = 0; subSubSectionIndex < sections[sectionIndex].subSections[subSectionIndex].subSections.length; subSubSectionIndex++) { - totalPassedSubSections = totalPassedSubSections + sections[sectionIndex].subSections[subSectionIndex].subSections[subSubSectionIndex].passed; - totalSubSections = totalSubSections + sections[sectionIndex].subSections[subSectionIndex].subSections[subSubSectionIndex].total; - } - - passedPercentage = totalPassedSubSections / totalSubSections * 100; - } - else { - passedPercentage = sections[sectionIndex].subSections[subSectionIndex].getPassPercentage(); - } - if (passedPercentage >= pageHelper.GREEN_LIMIT) { - styleClass = "reportGreen"; - } - else if (passedPercentage >= pageHelper.YELLOW_LIMIT) { - styleClass = "reportLightGreen"; - } - else if (passedPercentage >= pageHelper.RED_LIMIT) { - styleClass = "reportYellow"; - } - else { - styleClass = "reportRed"; - } - - dataTable.append('' + sections[sectionIndex].subSections[subSectionIndex].name + '' + (Math.round(passedPercentage)) + '%' + ''); - bResultsdisplayed = true; - } - } - - totalSubSectionPassed = 0; - } - - // append the legend if results have been displayed - if (bResultsdisplayed) { - $('#legend').show(); - } - - //Disappear the note if there are records in the result - if ($.trim(dataTable.text()) !== "") - $("#resultMessage").hide(); - else - $("#resultMessage").show(); - }, - - //It shows the sub section of the results - generateSubSectionReportTable: function (sectionIndex, subSectionIndex) { - var sections = window.sections; - var dataTable = $('.results-data-table'); - $('.results-data-table').find("tr").remove(); - - var styleClass; - var totalSubSectionPassed = 0; - var totalSubSectionFailed = 0; - - // if there is no subsections under a section(say 7.1) then directly display the detailed test report - if (!sections[sectionIndex].subSections[subSectionIndex].subSections) { - pageHelper.generateDetailedReportTable(sectionIndex, subSectionIndex); - } - else { - try { - $('.crumbs #link2').remove(); - } - catch (e) { - $('.crumbs #link2').text(""); - } - var anc2 = $("" + " Chapter " + sections[sectionIndex].id.toString() + ": " + sections[sectionIndex].name + ": " + sections[sectionIndex].subSections[subSectionIndex].name + " > " + ""); - anc2.attr('href', 'javascript:pageHelper.generateSubSectionReportTable(' + sectionIndex + ',' + subSectionIndex + ');'); - $('.crumbs').append(anc2); - - $('.crumbs #link2').removeClass().addClass("setBlack"); - $('.crumbs #link1').removeClass().addClass("setBlue"); - - var anc = $('.crumbs').find('a'); - anc.click(function () { - $(this).next('a').remove(); - }); - try { - $('.crumbs #link3').remove(); - } - catch (e) { - $('.crumbs #link3').text(""); - } - - for (var index = 0; index < sections[sectionIndex].subSections[subSectionIndex].subSections.length; index++) { - totalSubSectionPassed = totalSubSectionPassed + sections[sectionIndex].subSections[subSectionIndex].subSections[index].passed; - totalSubSectionFailed = totalSubSectionFailed + sections[sectionIndex].subSections[subSectionIndex].subSections[index].failed; - } - - var totalCasesInSection = sections[sectionIndex].subSections[subSectionIndex].total - totalSubSectionPassed - totalSubSectionFailed; - var totalPassedCasesInSection = sections[sectionIndex].subSections[subSectionIndex].passed - totalSubSectionPassed; - var totalFailedCasesInSection = sections[sectionIndex].subSections[subSectionIndex].failed - totalSubSectionFailed; - $('.totalCases').text(sections[sectionIndex].subSections[subSectionIndex].total); - $('.passedCases').text(sections[sectionIndex].subSections[subSectionIndex].passed); - $('.failedCases').text(sections[sectionIndex].subSections[subSectionIndex].failed); - - if (sections[sectionIndex].subSections[subSectionIndex].testCaseArray.length > 0) { - - // var calculatedLimit = Math.round((sections[sectionIndex].subSections[subSectionIndex].passed) / sections[sectionIndex].subSections[subSectionIndex].testCaseArray.length * 100); - var calculatedLimit = Math.round((totalPassedCasesInSection / totalCasesInSection) * 100); - if (calculatedLimit >= 75) { - styleClass = "reportGreen"; - } - else if (calculatedLimit >= 50) { - styleClass = "reportYellow"; - } - else { - styleClass = "reportRed"; - } - - dataTable.append('' + "Section: " + sections[sectionIndex].subSections[subSectionIndex].id + " cases" + '' + calculatedLimit + '%' + ''); - } - - if (sections[sectionIndex].subSections[subSectionIndex].subSections) { - for (var objIndex = 0; objIndex < sections[sectionIndex].subSections[subSectionIndex].subSections.length; objIndex++) { - if (sections[sectionIndex].subSections[subSectionIndex].subSections[objIndex].total !== 0) { - - var passedPercentage = sections[sectionIndex].subSections[subSectionIndex].subSections[objIndex].getPassPercentage(); - if (passedPercentage >= pageHelper.YELLOW_LIMIT) { - styleClass = "reportGreen"; - } - else if (passedPercentage >= pageHelper.RED_LIMIT) { - styleClass = "reportYellow"; - } - else { - styleClass = "reportRed"; - } - dataTable.append('' + sections[sectionIndex].subSections[subSectionIndex].subSections[objIndex].name + '' + (Math.round(passedPercentage)) + '%' + ''); - - } - } - } - } - pageHelper.doBackButtonTasks(); - }, - - generateDetailedReportTable: function (sectionIndex, subSectionIndex, subInnerSectionIndex) { - var sections = window.sections; - var dataTable = $('.results-data-table'); - - $('.results-data-table').find("tr").remove(); - var mainSectionPassed = 0; - var mainSectionfailed = 0; - - var subSectionPassed = 0; - var subSectionfailed = 0; - - var resultStyle = "pass"; - var subSectionObj; - // sub sections - if (subSectionIndex !== -1) { - // if there is only one level of subsections example: 7.1 - if (!sections[sectionIndex].subSections[subSectionIndex].subSections) { - subSectionObj = sections[sectionIndex].subSections[subSectionIndex]; - - $('.totalCases').text(subSectionObj.total); - $('.passedCases').text(subSectionObj.passed); - $('.failedCases').text(subSectionObj.failed); - - } - // cases directly under sub-subsections example: 7.1.1 - else if (sections[sectionIndex].subSections[subSectionIndex].subSections.length > 0 && subInnerSectionIndex !== undefined) { - - subSectionObj = sections[sectionIndex].subSections[subSectionIndex].subSections[subInnerSectionIndex]; - $('.sectionId').text("section: " + subSectionObj.id); - $('.totalCases').text(subSectionObj.total); - $('.passedCases').text(subSectionObj.passed); - $('.failedCases').text(subSectionObj.failed); - } - // cases directly under subsections example: 7.1 - else if (sections[sectionIndex].subSections[subSectionIndex].testCaseArray.length > 0) { - subSectionObj = sections[sectionIndex].subSections[subSectionIndex]; - $('.totalCases').text(subSectionObj.total); - $('.passedCases').text(subSectionObj.passed); - $('.failedCases').text(subSectionObj.failed); - } - - var anc3 = $('' + " Section: " + subSectionObj.id + " " + subSectionObj.name + ''); - $('.crumbs').append(anc3); - $('.crumbs #link3').removeClass().addClass("setBlack"); - $('.crumbs #link2').removeClass().addClass("setBlue"); - $('.crumbs #link1').removeClass().addClass("setBlue"); - - - for (var objIndex = 0; objIndex < subSectionObj.testCaseArray.length; objIndex++) { - if (subSectionObj.testCaseArray[objIndex].res.toLowerCase() === 'pass') { - resultStyle = "pass"; - } - else { - resultStyle = "fail"; - } - var path = subSectionObj.testCaseArray[objIndex].path.indexOf('resources/') === -1 ? 'resources/scripts/' + subSectionObj.testCaseArray[objIndex].path : subSectionObj.testCaseArray[objIndex].path; - dataTable.append('' + subSectionObj.testCaseArray[objIndex].id + '' + subSectionObj.testCaseArray[objIndex].description + '' + subSectionObj.testCaseArray[objIndex].res + '[source]'); - } - } - // testcases directly under a chapter when there are no sections in a chapter - else { - anc3 = $('' + " Chapter: " + sections[sectionIndex].id + ": " + sections[sectionIndex].name + ''); - $('.crumbs').append(anc3); - - $('.crumbs #link3').removeClass().addClass("setBlack"); - $('.crumbs #link2').removeClass().addClass("setBlue"); - $('.crumbs #link1').removeClass().addClass("setBlue"); - - $('.sectionId').text("section: " + sections[sectionIndex].id); - - for (var subSectionIndex = 0; subSectionIndex < sections[sectionIndex].subSections.length; subSectionIndex++) { - mainSectionPassed = mainSectionPassed + sections[sectionIndex].subSections[subSectionIndex].passed; - mainSectionfailed = mainSectionfailed + sections[sectionIndex].subSections[subSectionIndex].failed; - } - $('.totalCases').text(sections[sectionIndex].total - mainSectionPassed - mainSectionfailed); - $('.passedCases').text(sections[sectionIndex].passed - mainSectionPassed); - $('.failedCases').text(sections[sectionIndex].failed - mainSectionfailed); - - $('.detailedResult').text("Total tests: " + sections[sectionIndex].testCaseArray.length + " Passed: " + (sections[sectionIndex].passed - mainSectionPassed) + " Failed: " + (sections[sectionIndex].failed - mainSectionfailed)); - for (var arrayIndex = 0; arrayIndex < sections[sectionIndex].testCaseArray.length; arrayIndex++) { - if (sections[sectionIndex].testCaseArray[arrayIndex].res.toLowerCase() === 'pass') { - resultStyle = "pass"; - } - else { - resultStyle = "fail"; - } - path = sections[sectionIndex].testCaseArray[arrayIndex].path.indexOf('resources/') === -1 ? 'resources/scripts/' + sections[sectionIndex].testCaseArray[arrayIndex].path : sections[sectionIndex].testCaseArray[arrayIndex].path; - dataTable.append('' + sections[sectionIndex].testCaseArray[arrayIndex].id + '' + sections[sectionIndex].testCaseArray[arrayIndex].description + '' + sections[sectionIndex].testCaseArray[arrayIndex].res + '[source]'); - } - } - - pageHelper.doBackButtonTasks(); - }, - - //It shows the back link - doBackButtonTasks: function () { - $('#backlinkDiv').show(); - //The below logic is applied because .remove() is giving object error in the function "generateReportTable" that I could not find the reason. - //That is why I am keeping the links (#link1, #link2 and #link3) blank if any error . - var anchors = []; - $('.crumbs a').each(function (index, anchor) { - if ($(anchor).text() !== "") { - anchors[anchors.length] = anchor; - } - }); - var contextAnchor = anchors[anchors.length - 2]; - $('#backlinkDiv').attr('href', contextAnchor.href); + reportWindow.document.writeln("
Instructions: Update the BROWSERNAME value and submit to Hg. Send email to the list for assistance.
"); + reportWindow.document.write("\r\n'); + reportWindow.document.close(); } -}; -//Extend the array type -getArrayCloneOfObject = function (oldObject) -{ - var tempClone = {}; - if (typeof (oldObject) === "object") - { - for (prop in oldObject) - { - if ((typeof (oldObject[prop]) === "object") && (oldObject[prop]).__isArray) - { - tempClone[prop] = getArrayCloneOfObject(oldObject[prop]); - } - else if (typeof (oldObject[prop]) === "object") - { - tempClone[prop] = getArrayCloneOfObject(oldObject[prop]); - } - else - { - tempClone[prop] = oldObject[prop]; + /* 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(); + } + + /* Go back to the previous section */ + function goBack(e) { + e.preventDefault(); + + if(currentSection === globalSection) + return; + + currentSection = currentSection.parentSection; + renderCurrentSection(); + } + + /* Returns the section object for the specified section id (eg. "7.1" or "15.4.4.12"). */ + function getSectionById(id) { + if(id == 0) + return globalSection; + + var match = id.match(/\d+/g); + var section = globalSection; + + for(var i = 0; i < match.length; i++) { + if(typeof section.subsections[match[i]] !== "undefined") { + section = section.subsections[match[i]]; + } else { + break; } } + + return section; + } + + /* 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); + } + + /* Append a result to the run page's result log. */ + function logResult(test) { + altStyle = (altStyle !== ' ') ? ' ' : 'alternate'; + var appendStr = '' + test.id + '' + test.description + '' + test.result + ''; + logger.append(appendStr); + logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight")); + } + + // Load the sections. + loadSections(); + + this.setTotalTests = function(tests) { + totalTests = tests; + $('#testsToRun').text(tests); + } + + this.setVersion = function(v) { + version = v; + $(".targetTestSuiteVersion").text(v); + } + + this.setDate = function(d) { + date = d; + $(".targetTestSuiteDate").text(d); + } + + /* 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); + + updateCounts(); + + if(test.result === 'fail') + logResult(test); + + } + + this.started = function () { + $('.button-start').attr('src', 'resources/images/pause.png'); + } + + this.paused = function () { + $('.button-start').attr('src', 'resources/images/resume.png'); + } + + this.reset = function() { + globalSection.reset(); + updateCounts(); + logger.empty(); + + currentSection = globalSection; + renderCurrentSection(); + } + + this.finished = function() { + $('.button-start').attr('src', 'resources/images/start.png'); + activityBar.text(''); + } + + /* Refresh display of the report */ + this.refresh = function() { + renderCurrentSection(); + } + + /* Write status to the activity bar. */ + this.updateStatus = function(str) { + activityBar.text(str); + } + + /* Do some setup tasks. */ + this.setup = function() { + backLink = $('#backlinkDiv'); + backLink.click(goBack); + table = $('.results-data-table'); + logger = $("#tableLogger"); + progressBar = $('#progressbar'); + activityBar = $('#nextActivity'); + + $('#ancGenXMLReport').click(createXMLReportWindow); } - return tempClone; } -CloneArray = function (arrayObj) -{ - var tempClone = []; - for (var arrIndex = 0; arrIndex <= arrayObj.length; arrIndex++) - { - if (typeof (arrayObj[arrIndex]) === "object") - { - tempClone.push(getArrayCloneOfObject(arrayObj[arrIndex])); - } else - { - tempClone.push(arrayObj[arrIndex]); - } - } - return tempClone; -} +var presenter = new Presenter(); diff --git a/website/resources/scripts/global/math_isequal.js b/website/resources/scripts/global/math_isequal.js new file mode 100644 index 0000000000..a68434e075 --- /dev/null +++ b/website/resources/scripts/global/math_isequal.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var prec; +function isEqual(num1, num2) +{ + if ((num1 === Infinity)&&(num2 === Infinity)) + { + return(true); + } + if ((num1 === -Infinity)&&(num2 === -Infinity)) + { + return(true); + } + prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); + return(Math.abs(num1 - num2) <= prec); + //return(num1 === num2); +} + diff --git a/website/resources/scripts/global/math_precision.js b/website/resources/scripts/global/math_precision.js new file mode 100644 index 0000000000..805b344b72 --- /dev/null +++ b/website/resources/scripts/global/math_precision.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function getPrecision(num) +{ + //TODO: Create a table of prec's, + // because using Math for testing Math isn't that correct. + + log2num = Math.log(Math.abs(num))/Math.LN2; + pernum = Math.ceil(log2num); + return(2 * Math.pow(2, -52 + pernum)); + //return(0); +} diff --git a/website/resources/scripts/global/numeric_conversion.js b/website/resources/scripts/global/numeric_conversion.js new file mode 100644 index 0000000000..427eeaa21e --- /dev/null +++ b/website/resources/scripts/global/numeric_conversion.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function ToInteger(p) { + x = Number(p); + + if(isNaN(x)){ + return +0; + } + + if((x === +0) + || (x === -0) + || (x === Number.POSITIVE_INFINITY) + || (x === Number.NEGATIVE_INFINITY)){ + return x; + } + + var sign = ( x < 0 ) ? -1 : 1; + + return (sign*Math.floor(Math.abs(x))); +} diff --git a/website/resources/scripts/global/sections.js b/website/resources/scripts/global/sections.js index f298530065..096b5ac506 100644 --- a/website/resources/scripts/global/sections.js +++ b/website/resources/scripts/global/sections.js @@ -1,131 +1,163 @@ +/// Copyright (c) 2009 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * 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. +/// * 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. +/// +/// 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 +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// 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, +/// 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. - -var SECTION_TOC_OFFSET = 7; - -//represents the class template for sections -function Section(id, name, subSections) { +/* 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 + */ +function Section(parentSection, id, name) { + this.parentSection = parentSection; this.id = id; this.name = name; - this.passed = 0; - this.failed = 0; - this.total = 0; - this.subSections = subSections; - this.testCaseArray = []; - this.getPassPercentage = function () { - if (this.total > 0) { - return (this.passed / this.total) * 100; + this.subsections = {}; + this.tests = []; + this.totalTests = 0; + this.totalPassed = 0; + this.totalFailed = 0; + this.totalFailedToLoad = 0; + + var section = this, + RED_LIMIT = 50, + YELLOW_LIMIT = 75, + GREEN_LIMIT = 99.9; + + /* Get the class for a result cell given the pass percent. */ + function rollupCellClass(passPercent) { + if(passPercent >= GREEN_LIMIT) { + return "reportGreen"; + } else if (passPercent >= YELLOW_LIMIT) { + return "reportLightGreen"; + } else if (passPercent >= RED_LIMIT) { + return "reportYellow"; } - else { + + return "reportRed"; + } + + /* Calculate pass percent */ + this.passPercent = function() { + if(this.totalTests === 0) { return 0; } - }; -} -function resetResults() { + return Math.round((this.totalPassed / this.totalTests) * 100); + } - for (var secInd = 0; secInd < sections.length; secInd++) { - for (var subSecInd = 0; subSecInd < sections[secInd].subSections.length; subSecInd++) { - sections[secInd].subSections[subSecInd].total = 0; - sections[secInd].subSections[subSecInd].passed = 0; - sections[secInd].subSections[subSecInd].failed = 0; + /* Add a test result to this section. Pushes the result to the test array and passes the result to addTestResult to + * tabulate pass/fail numbers*/ + this.addTest = function(test) { + this.tests.push(test); + this.addTestResult(test); + } + + /* Increments the various rollup counters for this section and all parent sections */ + this.addTestResult = function(test) { + this.totalTests++; + + if(test.result === "pass") + this.totalPassed++; + else + this.totalFailed++; + + if(test.error === 'Failed to Load') + this.totalFailedToLoad++; + + if(this.parentSection !== null) + this.parentSection.addTestResult(test); + } + + /* Renders this section as HTML. Used for the report page.*/ + this.toHTML = function(options) { + var defaultOptions = {header: false, renderSubsections: true}; + + if (typeof options === undefined) { + options = defaultOptions; + } else { + options = $.extend(defaultOptions, options); } - } -} - -//array to hold the sections data -var sections = []; - -// Add a node from TOC xml as a section into sections array -function addSection(node, nodeSections) { - // Populate subsections - var tocSubSections = []; - var nodes = node.childNodes; - for (var i = 0; i < nodes.length; i++) { - if (nodes[i].nodeName === "sec") { - addSection(nodes[i], tocSubSections); + var html = ''; + + if(options.header) { + html += "Chapter " + this.id + " - " + this.name + "" + + "" + this.passPercent() + "%"; } + + for(var i = 0; i < this.tests.length;i++) { + test = this.tests[i]; + html += "" + test.id + "" + + "" + test.description + "" + + "[source]" + + "" + test.result + "" + } + + for(var sectionId in this.subsections) { + var section = this.subsections[sectionId]; + + if(section.totalTests > 0) { + if(options.renderSubsections) { + html += section.toHTML({header: true, renderSubsections: false}) + } else { + html += "Chapter " + section.id + " - " + section.name + "" + + "" + section.passPercent() + "%"; + } + } + } + + return html + ""; } - // Add into section - if (tocSubSections.length > 0) { - nodeSections[nodeSections.length] = new Section(node.getAttribute('id').toString(), node.getAttribute('name'), tocSubSections); - } else { - nodeSections[nodeSections.length] = new Section(node.getAttribute('id').toString(), node.getAttribute('name')); + /* Render this section as XML. Used for the report page. */ + this.toXML = function() { + var xml = ""; + if(this.id != 0) { + xml += "
\r\n"; + + for (var i = 0; i < this.tests.length; i++) { + xml += '\r\n' + + ' ' + this.tests[i].id + '\r\n' + + ' ' + this.tests[i].result + '\r\n' + + '\r\n'; + } + } + + for (var subsection in this.subsections) { + xml += this.subsections[subsection].toXML(); + } + + if(this.id != 0) { + xml += '
\r\n'; + } + + return xml; } -} -// Load all sections from TOC xml -function loadSections() { - // Constant for TOC file path - var TOCFILEPATH = "resources/scripts/global/ecma-262-toc.xml"; + /* Reset counts and remove tests. */ + this.reset = function() { + this.tests = []; + this.totalTests = 0; + this.totalPassed = 0; + this.totalFailed = 0; + this.totalFailedToLoad = 0; - // Load TOC from xml - var sectionsLoader = new XMLHttpRequest(); - sectionsLoader.open("GET", TOCFILEPATH, false); - sectionsLoader.send(); - var xmlDoc = sectionsLoader.responseXML; - var nodes = xmlDoc.documentElement.childNodes; - for (var i = 0; i < nodes.length; i++) { - if (nodes[i].nodeName === "sec") { - addSection(nodes[i], sections); + for(var subsection in this.subsections) { + this.subsections[subsection].reset(); } } } - -function existsSection(section) { - var retValue = false; - - holdArray = section.split("."); - //subtract SECTION_TOC_OFFSET, since sections start from SECTION_TOC_OFFSET and section array from 0 - chapterId = holdArray[0] - SECTION_TOC_OFFSET; - if (holdArray.length > 0) { - retValue = sections[chapterId] !== undefined ? true : false; - } - if (retValue && (holdArray.length > 1)) { - retValue = ((sections[chapterId].subSections !== undefined) && (sections[chapterId].subSections[holdArray[1] - 1] !== undefined)) ? true : false; - } - if (retValue && (holdArray.length > 2)) { - retValue = ((sections[chapterId].subSections !== undefined) && (sections[chapterId].subSections[holdArray[1] - 1].subSections !== undefined) && (sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1] !== undefined)) ? true : false; - } - - return retValue; -} - -function addCountToSection(section, type) { - holdArray = section.split("."); - //subtract SECTION_TOC_OFFSET, since sections start from SECTION_TOC_OFFSET and section array from 0 - chapterId = holdArray[0] - SECTION_TOC_OFFSET; - switch (type) { - case 'total': - sections[chapterId].total++; - if (holdArray.length === 2 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].total++; - } - if (holdArray.length === 3 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].total++; - sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1].total++; - } - break; - case 'passed': - sections[chapterId].passed++; - if (holdArray.length === 2 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].passed++; - } - if (holdArray.length === 3 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].passed++; - sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1].passed++; - } - break; - case 'failed': - sections[chapterId].failed++; - if (holdArray.length === 2 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].failed++; - } - if (holdArray.length === 3 & existsSection(section)) { - sections[chapterId].subSections[holdArray[1] - 1].failed++; - sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1].failed++; - } - break; - } -} \ No newline at end of file diff --git a/website/resources/scripts/global/sth.js b/website/resources/scripts/global/sth.js index 466ce698cb..cb8702b760 100644 --- a/website/resources/scripts/global/sth.js +++ b/website/resources/scripts/global/sth.js @@ -18,697 +18,284 @@ /// 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. + /* -sth: Simple Test Harness -*/ -sth.prototype.matchTestPath = function (filePath) { - var cannonicalPath = filePath.slice(filePath.indexOf('TestCases')); - var possibleMatch = this.testsByPath[cannonicalPath]; - if (possibleMatch) return possibleMatch; - var pathId = filePath.slice(filePath.lastIndexOf('/') + 1, -3); - possibleMatch = this.testsById[pathId]; - if (possibleMatch) return possibleMatch; - return null; + * Run a test in the browser. Works by injecting an iframe with the test code. + * + * Public Methods: + * * run(id, test): Runs the test specified. + * + * Callbacks: + * * onComplete(test): Called when the test is run. Test object contains result and error strings describing how the + * test ran. + */ +function BrowserRunner() { + var iframe, // injected iframe + currentTest, // Current test being run. + scriptCache = {}, // Holds the various includes required to run certain sputnik tests. + instance = this; + + /* Called by the child window to notify that the test has finished. This function call is put in a separate script + * block at the end of the page so errors in the test script block should not prevent this function from being + * called. + */ + function testFinished() { + if(typeof currentTest.result === "undefined") { + // We didn't get a call to testRun, which likely means the test failed to load. + currentTest.result = "fail"; + currentTest.error = "Failed to Load"; + } else if(typeof currentTest.error !== "undefined") { + // We have an error logged from testRun. + if(currentTest.error instanceof SputnikError) { + currentTest.error = currentTest.message; + } else { + currentTest.error = currentTest.error.name + ": " + currentTest.error.message + } + } + + document.body.removeChild(iframe); + + instance.onComplete(currentTest); + } + + /* Called from the child window after the test has run. */ + function testRun(id, path, description, codeString, preconditionString, result, error) { + currentTest.id = id; + currentTest.path = path; + currentTest.description = description; + currentTest.result = result; + currentTest.error = error; + currentTest.code = codeString; + currentTest.pre = preconditionString; + } + + + /* Run the test. */ + this.run = function(id, code) { + var includes = code.match(/\$INCLUDE\(([^\)]+)\)/g), // find all of the $INCLUDE statements + include; + + currentTest = {id: id}; // default test, in case it doesn't get registered. + + iframe = document.createElement("iframe"); + iframe.setAttribute("style", "display:none"); + iframe.setAttribute("id", "runnerIframe"); + + document.body.appendChild(iframe); + + var win = window.frames[window.frames.length - 1]; + var doc = win.document; + + doc.open(); + + // Set up some globals. + win.testRun = testRun; + win.testFinished = testFinished; + win.fnSupportsStrict = fnSupportsStrict; + win.fnExists = fnExists; + win.ConvertToFileUrl = ConvertToFileUrl; + win.fnSupportsArrayIndexGettersOnObjects = fnSupportsArrayIndexGettersOnObjects; + win.fnSupportsArrayIndexGettersOnArrays = fnSupportsArrayIndexGettersOnArrays; + win.arrayContains = arrayContains; + win.compareArray = compareArray; + win.SputnikError = SputnikError; + win.$ERROR = $ERROR; + win.$FAIL = $FAIL; + win.$PRINT = function () {}; + win.$INCLUDE = function() {}; + + + if(includes !== null) { + // We have some includes, so loop through each include and pull in the dependencies. + for(var i = 0; i < includes.length; i++) { + include = includes[i].replace(/.*\(('|")(.*)('|")\)/, "$2"); + + // First check to see if we have this script cached already, and if not, grab it. + if(typeof scriptCache[include] === "undefined") { + $.ajax({ + async: false, + url: 'resources/scripts/global/' + include, + success: function(s) { scriptCache[include] = s } + }) + } + + // Finally, write the required script to the window. + doc.writeln(""); + } + } + + // Write ES5Harness.registerTest and fnGlobalObject, which returns the global object, and the testFinished call. + doc.writeln("" + + "" + + "") + doc.close(); + } } -function sth(globalObj) { - //constants - var LOAD_TIMER_PERIOD = 20, - RUN_TIMER_PERIOD = 20, - DEFER_STOP_COUNT = 10, - DEFER_CHECK_TIMER_PERIOD = 50, - TEST_LIST_PATH = "resources/scripts/testcases/testcaseslist.xml"; - - //private variables of this object/class - var callback, - scriptLoadTimer, - testRunTimer, - toublesomeTest, - requestPending, - globalState; - var stopCommand = false; - //It is an array that stores all the chapters' test cases when registerTest function is called. - //It is used later to retrieve the count of total test cases. - var tests = []; - //It is an array that stores all the chapters' test cases when registerTest function is called. - //It is used later to retrieve the test case to run unit test on it. - var buffer = []; - var cachedGlobal = globalObj; - var totalTestsRun = 0; - var totalTestsPassed = 0; - var totalTestsFailed = 0; - var failedTestCases = []; - var allScriptTagsInjected = false; - var testCasePaths = []; - var possibleTestScripts = 0; - var totalTestCases = 0; - var executionCount = 0; - var failedToLoad = 0; - var loaderIframe = null; - var xmlListLoaded = false; - var xmlTestsLoaded = false; - var aryTestCasePaths = []; - //It stores all the main xml path - var aryTestGroups = []; - //It also stores all the main xml path for buffer - var aryTestGroupsBuffer = []; - var failToLoadTests = []; +/* Loads tests from the sections specified in testcaseslist.xml. + * Public Methods: + * * getNextTest() - Start loading the next test. + * * reset() - Start over at the first test. + * + * Callbacks: + * * onLoadingNextSection(path): Called after a request is sent for the next section xml, with the path to that xml. + * * onInitialized(totalTests, version, date): Called after the testcaseslist.xml is loaded and parsed. + * * 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. + */ +function TestLoader() { + var TEST_LIST_PATH = "resources/scripts/testcases/testcaseslist.xml", + testGroups = [], + testGroupIndex = 0, + currentTestIndex = 0, + loader = this; - var cachedProperties = [ - 'undefined', - 'NaN', - 'Infinity', - 'Object', - 'Object.prototype', - 'Object.prototype.toString', - 'Array', - 'Array.prototype', - 'Array.prototype.toString', - 'Function', - 'Function.prototype', - 'Function.prototype.toString', - 'String', - 'String.prototype', - 'String.prototype.toString', - 'String.fromCharCode', - 'Number', - 'Number.prototype.toString', - 'Boolean', - 'Boolean.prototype.toString', - 'RegExp', - 'RegExp.prototype', - 'RegExp.prototype.toString', - 'Math', - 'Error', - 'Error.prototype', - 'Error.prototype.toString', - 'eval', - 'parseInt', - 'parseFloat', - 'isNaN', - 'isFinite', - 'EvalError', - 'RangeError', - 'ReferenceError', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Date', - 'Date.prototype', - 'Date.UTC', - 'Date.parse', - 'Date.prototype.toLocaleTimeString', - 'Date.prototype.toTimeString', - 'Date.prototype.toTimeString', - 'Date.prototype.valueOf', - 'Date.prototype.toString', - 'Date.prototype.toLocaleString', - 'Date.prototype.toDateString', - 'Date.prototype.constructor', - 'Date.prototype.getFullYear', - 'Date.prototype.getUTCFullYear', - 'Date.prototype.getMonth', - 'Date.prototype.getUTCMonth', - 'Date.prototype.getTime', - 'Date.prototype.getDate', - 'Date.prototype.getUTCDate', - 'Date.prototype.getUTCDay', - 'Date.prototype.getDay', - 'Date.prototype.getUTCHours', - 'Date.prototype.getHours', - 'Date.prototype.getMinutes', - 'Date.prototype.getUTCMinutes', - 'Date.prototype.getSeconds', - 'Date.prototype.getUTCSeconds', - 'Date.prototype.getMilliseconds', - 'Date.prototype.getUTCMilliseconds', - 'Date.prototype.getTimezoneOffset', - 'Date.prototype.setFullYear', - 'Date.prototype.setUTCFullYear', - 'Date.prototype.setMonth', - 'Date.prototype.setUTCMonth', - 'Date.prototype.setTime', - 'Date.prototype.setDate', - 'Date.prototype.setUTCDate', - 'Date.prototype.setUTCDay', - 'Date.prototype.setDay', - 'Date.prototype.setUTCHours', - 'Date.prototype.setHours', - 'Date.prototype.setMinutes', - 'Date.prototype.setUTCMinutes', - 'Date.prototype.setSeconds', - 'Date.prototype.setUTCSeconds', - 'Date.prototype.setMilliseconds', - 'Date.prototype.setUTCMilliseconds', - 'Date.prototype.toUTCString', - 'Date.prototype.toISOString', - 'Date.prototype.toJSON', - 'Date.prototype.toLocaleDateString' - ] + this.version = undefined; + this.date = undefined; + this.totalTests = 0; - globalState = {}; + /* Get the XML for the next section */ + function getNextXML() { + var group = testGroups[testGroupIndex]; + currentTestIndex = 0; - var tokens; - var base; - var prop; - - for (var i = 0; i < cachedProperties.length; i++) { - tokens = cachedProperties[i].split("."); - base = cachedGlobal; - - while (tokens.length > 1) - base = base[tokens.shift()]; - - prop = tokens.shift(); - - globalState[cachedProperties[i]] = base[prop]; - } - - //private methods - function clearTimers() { - window.clearTimeout(scriptLoadTimer); - window.clearTimeout(testRunTimer); - } - - - var currentTestId; - - function restoreGlobals() { - var tokens; - var base; - var prop; - - for (var key in globalState) { - tokens = key.split("."); - base = cachedGlobal; - - while (tokens.length > 1) { - prop = tokens.shift(); - base = base[prop]; - } - - prop = tokens.shift(); - - if (base[prop] === base[prop] && base[prop] !== globalState[key]) - { - base[prop] = globalState[key]; - } - } - - } - - function htmlEscape(str) { - str = str.replace(//g, '>'); - } - - //public methods - this.getTotalTestsRun = function() { - return totalTestsRun; - } - - this.getTotalTestsPassed = function() { - return totalTestsPassed; - } - - this.getTotalTestsToRun = function() { - return aryTestGroups.numTests; - } - - this.getTotalTestsFailed = function() { - return totalTestsFailed; - } - - this.registerTest = function(to) { - var t = new sth_test(to); - t.registrationIndex = tests.length; - tests.push(t); - buffer.push(t); - } - - //If user enters chapter index, it sets the aryTestGroups, tests, buffer and initialize the subsections - //If user enters nothing, it executes all the test cases - this.setChapter = function () { - aryTestGroups = CloneArray(aryTestGroupsBuffer); - aryTestGroups.numTests = aryTestGroupsBuffer.numTests; - var userInputChapterIndex = $.trim($("#chapterId").val()); - - tests = []; - buffer = []; - - //Initialize the subSections - for (var secInd = 0; secInd < sections.length; secInd++) { - for (var subSecInd = 0; subSecInd < sections[secInd].subSections.length; subSecInd++) { - sections[secInd].subSections[subSecInd].total = 0; - sections[secInd].subSections[subSecInd].passed = 0; - sections[secInd].subSections[subSecInd].failed = 0; - } - } - $(".results-data-table").html(""); - stopCommand = false; - - if (callback) { - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { - totalTestsRun: 0, - totalTestsFailed: 0, - totalTestsPassed: 0, - totalTestsToRun: 0, - failedTestCases: 0, - totalTestsLoaded: 0, - failedToLoad: 0, - totalTestCasesForProgressBar: 0, - nextActivity: "" - }); - } - - if (userInputChapterIndex !== "") { - var mapedChapterIndex = null; - for (var chapterIndex = 0; chapterIndex < aryTestGroups.length; chapterIndex++) { - if (chapterIndex === parseInt(userInputChapterIndex)) { - mapedChapterIndex = chapterIndex; - } - } - - if (mapedChapterIndex !== null) { - aryTestGroups = []; - aryTestGroups[0] = aryTestGroupsBuffer[mapedChapterIndex]; - aryTestGroups.numTests = aryTestGroupsBuffer.numTests; - } - else { - $("#resultMessage").show(); - alert("Chapter index is not valid. Please keep blank for execution of all the test cases or enter correct index"); - return false; - } - } - - return true; - } - - this.run = function () - { - var ut = undefined; // a particular unittest - var res = false; // the result of running the unittest - var prereq = undefined; // any prerequisite specified by the unittest - var pres = true; // the result of running that prerequite - var alphaNumericWithDot = /^[sS]?[0-9]{1,2}([.]?[0-9]{1,2}){0,2}/gi; - var holdArray; - var subsectionId; - var chapterId; - - ut = buffer.shift(); - if (!ut) - { + if(group.tests.length > 0) { + // already loaded this section. + loader.getNextTest(); return; } - executionCount++; - //this.currentTest = ut; + + $.ajax({url: group.path, dataType: 'xml', success: function(data) { + group.tests = data.getElementsByTagName("test"); + loader.getNextTest(); + }}); - - if (callback) - { - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { totalTestsRun: totalTestsRun, //Total run - //totalRun : sth.tests.length, - totalTestsFailed: totalTestsFailed, - totalTestsPassed: totalTestsPassed, - totalTestsToRun: totalTestCases, - failedTestCases: failedTestCases, - totalTestsLoaded: tests.length, - failedToLoad: failedToLoad, - totalTestCasesForProgressBar: ((totalTestsRun / totalTestCases) * 100) < 99 ? totalTestCases : tests.length, - nextActivity: "executing ... " + ut.id - }); - } - - // if the test specifies a prereq, run that. - pre = ut.pre; - pres = true; - currentTestId = ut.id; - if (pre !== undefined) - { - try - { - pres = pre.call(ut); - restoreGlobals(); - if (pres !== true) - { - ut.res = 'Precondition failed'; - } - } catch (e) - { - restoreGlobals(); - pres = false; - var errDes = (e.message) ? e.message : e.description; - ut.res = 'Precondition failed with exception: ' + errDes; - } - } - - //read the chapter id and sub section id by spliting the testcase id - match2 = ut.id.match(alphaNumericWithDot); - subsectionId = match2[0]; - if (match2[0].toLowerCase().indexOf('s') != -1) - { - subsectionId = subsectionId.substring(1); - } - holdArray = subsectionId.split("."); - chapterId = holdArray[0] - SECTION_TOC_OFFSET; - addCountToSection(subsectionId, "total"); - // if the prereq is met, run the testcase now. - if (pres === true) - { - try - { - res = ut.theTestcase.call(ut.testObj); - restoreGlobals(); - if (res === true || res === undefined) - { - ut.res = 'pass'; - totalTestsPassed++; - addCountToSection(subsectionId, "passed"); - } - else - { - ut.res = 'fail'; - totalTestsFailed++; - failedTestCases[failedTestCases.length] = ut; - addCountToSection(subsectionId, "failed"); - } - } - catch (e) - { - restoreGlobals(); - var errDes = (e.message) ? e.message : e.description; - ut.res = 'failed with exception: ' + errDes; - totalTestsFailed++; - failedTestCases[failedTestCases.length] = ut; - addCountToSection(subsectionId, "failed"); - } - } - else - { - totalTestsFailed++; - failedTestCases[failedTestCases.length] = ut; - addCountToSection(subsectionId, "failed"); - } - if (holdArray.length > 1) - { - if (holdArray.length === 3 & existsSection(subsectionId)) - { - sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1].testCaseArray[sections[chapterId].subSections[holdArray[1] - 1].subSections[holdArray[2] - 1].testCaseArray.length] = ut; - } - else - { - sections[chapterId].subSections[holdArray[1] - 1].testCaseArray[sections[chapterId].subSections[holdArray[1] - 1].testCaseArray.length] = ut; - } - } - else - sections[chapterId].testCaseArray[sections[chapterId].testCaseArray.length] = ut; - - totalTestsRun++; + loader.onLoadingNextSection(group.path); } - - this.startTesting = function (pageCallback, command) { - if (!xmlListLoaded) { - this.loadTestList(); - return; - } - stopCommand = false; - - var scriptLoader = new XMLHttpRequest(); - function loadNextTest() { - testPath = aryTestGroups.shift(); - if (!testPath) { - allScriptTagsInjected = true; - scriptLoader = null; - } - else { - scriptLoader.onreadystatechange = function () { - if (scriptLoader.readyState == 4) { - if (callback) { - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { totalTestsRun: totalTestsRun, //Total run - totalTestsFailed: totalTestsFailed, - totalTestsPassed: totalTestsPassed, - totalTestsToRun: totalTestCases, - failedTestCases: failedTestCases, - totalTestsLoaded: tests.length, - failedToLoad: failedToLoad, - totalTestCasesForProgressBar: ((totalTestsRun / totalTestCases) * 100) < 99 ? totalTestCases : tests.length, - nextActivity: "loading... " + scriptLoader.responseXML.getElementsByTagName("section")[0].getAttribute("name") - }); - } - try { - var j = aryTestCasePaths.length; - var newTests = scriptLoader.responseXML.getElementsByTagName("test"); - - for (var i = 0; i < newTests.length; i++) { - var scriptCode = (newTests[i].firstChild.text != undefined) ? newTests[i].firstChild.text : newTests[i].firstChild.textContent; - loaderIframe.append(''); - aryTestCasePaths[j++] = newTests[i].getAttribute("id"); - if (tests[tests.length - 1].id != newTests[i].getAttribute("id")) { - failToLoadTests[failToLoadTests.length] = newTests[i].getAttribute("id"); - } - } - requestPending = false; - xmlTestsLoaded = true; - if (!stopCommand) - loadNextTest(); - } catch (e) { requestPending = false; } - } - }; - scriptLoader.open("GET", testPath, true); - scriptLoader.send(null); - requestPending = true; - } - } - scriptLoadTimer = setTimeout(loadNextTest, 0); - - totalTestCases = possibleTestScripts = aryTestGroups.numTests; - - switch (command) { - case "running": - case "reset": - if (!testCasePaths.length > 0 && !allScriptTagsInjected) { - testCasePaths = aryTestCasePaths.slice(0, aryTestCasePaths.length); - } else { - buffer = CloneArray(tests); - } - break; - } - - callback = pageCallback; - - var sth = this, - loaderIframe = $('head'), - testPath; - - function runNextTest() { - if (!xmlTestsLoaded) { - testRunTimer = setTimeout(runNextTest, RUN_TIMER_PERIOD); - return; - } - - if (buffer.length === 0 && !allScriptTagsInjected) { - testRunTimer = setTimeout(runNextTest, RUN_TIMER_PERIOD); - return; - } - if ($("#chapterId").val() !== "") { - totalTestCases = tests.length; - } - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { totalTestsRun: totalTestsRun, //Total run - //totalRun : sth.tests.length, - totalTestsFailed: totalTestsFailed, - totalTestsPassed: totalTestsPassed, - totalTestsToRun: totalTestCases, - failedTestCases: failedTestCases, - totalTestsLoaded: tests.length, - failedToLoad: failedToLoad, - totalTestCasesForProgressBar: ((totalTestsRun / totalTestCases) * 100) < 99 ? totalTestCases : tests.length - }); - - sth.run(); - if (allScriptTagsInjected - && executionCount === tests.length - && buffer.length === 0 - && !requestPending) { - - //Give the browser time to load the scripts, even if all the script tags have been injected, - //browser might be having a lot of them in the queue that are yet to load - if (DEFER_STOP_COUNT-- !== 0) { - testRunTimer = setTimeout(runNextTest, DEFER_CHECK_TIMER_PERIOD); - return; - } - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { totalTestsRun: totalTestsRun, - //totalRun : sth.tests.length, - totalTestsFailed: totalTestsFailed, - totalTestsPassed: totalTestsPassed, - totalTestsToRun: totalTestCases, - failedTestCases: failedTestCases, - completed: true, - failedToLoad: failedToLoad, - totalTestCasesForProgressBar: tests.length, - totalTestsLoaded: tests.length - }); - sth.stop(); - } - else if (!stopCommand) { - testRunTimer = setTimeout(runNextTest, RUN_TIMER_PERIOD); - DEFER_STOP_COUNT = 10; - } - } - testRunTimer = setTimeout(runNextTest, 0); - } - - //This function stops, resets and pauses on the basis of parameter passed to it. - this.stop = function(testStatus) { - clearTimers(); - stopCommand = true; - var totalTestCasesForProgressBar = tests.length; - - switch (testStatus) { - case "paused": - totalTestsRun = totalTestsRun; //Total run - totalTestsFailed = totalTestsFailed; - totalTestsPassed = totalTestsPassed; - totalTestsToRun = totalTestCases; - failedTestCases = failedTestCases; - totalTestsLoaded = tests.length; - totalTestCasesForProgressBar = ((totalTestsRun / totalTestCases) * 100) < 99 ? totalTestCases : tests.length; - break; - case "reset": - totalTestsRun = 0; //Total run - totalTestsFailed = 0; - totalTestsPassed = 0; - totalTestsLoaded = tests.length - global = window; - failedTestCases = []; - possibleTestScripts = totalTestCases; - loadSections(); - break; - case "stopped": - totalTestsRun = 0; - totalTestsPassed = 0; - totalTestsFailed = 0; - executionCount = 0 - totalTestCasesForProgressBar = tests.length; - } - - if (typeof callback !== 'undefined' && callback !== null) { - //It executes a callback function with an object that contains all the information like total test cases to run, left test cases to run etc. - //That updates the information on the UI - callback( - { totalTestsRun: totalTestsRun, //Total run - totalTestsFailed: totalTestsFailed, - totalTestsPassed: totalTestsPassed, - failedTestCases: failedTestCases, - totalTestsToRun: totalTestCases, - totalTestsLoaded: tests.length, - failedToLoad: failedToLoad, - totalTestCasesForProgressBar: totalTestCasesForProgressBar - }); - } - } - - this.getAllTests = function() { - return tests; - } - - this.getFailToLoad = function() { - return failToLoadTests; - } - - this.decrementTotalScriptCount = function() { - failedToLoad++; - } - - //It opens the source code for the test case that is run - this.openSourceWindow = function(idx) { - var ut = tests[idx]; - var popWnd = window.open("", "", "scrollbars=1, resizable=1"); - var innerHTML = ''; - - innerHTML += 'Test '; - if (ut.id) { - innerHTML += '' + ut.id + '

'; - } - - if (ut.description) { - innerHTML += 'Description'; - innerHTML += '
' + ut.description.replace(//g, '>'); +' 
'; - } - - innerHTML += '


Testcase'; - innerHTML += '
' + ut.theTestcase + '
'; - - if (ut.pre) { - innerHTML += 'Precondition'; - innerHTML += '
' + ut.pre + '
'; - } - - innerHTML += 'Path'; - innerHTML += '
' + ut.path + ' 
 '; - popWnd.document.write(innerHTML); - } - - //It loads all the chapters' xml that contains the informations of test cases - this.loadTestList = function(startTest) { + /* Get the test list xml */ + function loadTestXML() { var testsListLoader = new XMLHttpRequest(); - var sth = this; - testsListLoader.onreadystatechange = function(sth) { - if (testsListLoader.readyState == 4) { - oTests = testsListLoader.responseXML.getElementsByTagName('testGroup'); - var testSuite = testsListLoader.responseXML.getElementsByTagName('testSuite'); - pageHelper.XML_TARGETTESTSUITEVERSION = testSuite[0].getAttribute("version"); - pageHelper.XML_TARGETTESTSUITEDATE = testSuite[0].getAttribute("date"); - //It sets version and date in Run and Result tab. It is called from here so that if user goes directly to Run or Results tab, version and date should reflect. - pageHelper.setVersionAndDate(); - for (var i = 0; i < oTests.length; i++) { - aryTestGroups[i] = (oTests[i].text != undefined) ? oTests[i].text : oTests[i].textContent; - aryTestGroupsBuffer[i] = (oTests[i].text != undefined) ? oTests[i].text : oTests[i].textContent; + + $.ajax({url: TEST_LIST_PATH, dataType: 'xml', success: function(data) { + var oTests = data.getElementsByTagName('testGroup'); + var testSuite = data.getElementsByTagName('testSuite'); + + loader.version = testSuite[0].getAttribute("version"); + loader.date = testSuite[0].getAttribute("date"); + loader.totalTests = testSuite[0].getAttribute("numTests"); + + for (var i = 0; i < oTests.length; i++) { + testGroups[i] = { + path: (oTests[i].text != undefined) ? oTests[i].text : oTests[i].textContent, + tests: [] } - xmlListLoaded = true; - aryTestGroupsBuffer.numTests = aryTestGroups.numTests = testsListLoader.responseXML.getElementsByTagName('testSuite')[0].getAttribute("numTests"); - startTest && sth.startTesting(); } - }; - testsListLoader.open("GET", TEST_LIST_PATH, true); - testsListLoader.send(null); + + loader.onInitialized(loader.totalTests, loader.version, loader.date); + getNextXML(); + }}); + } + + /* Move on to the next test */ + this.getNextTest = function() { + if(testGroups.length == 0) { + // Initialize. + loadTestXML(); + } else if(currentTestIndex < testGroups[testGroupIndex].tests.length) { + // We have tests left in this test group. + var test = testGroups[testGroupIndex].tests[currentTestIndex++]; + var scriptCode = (test.firstChild.text != undefined) ? test.firstChild.text : test.firstChild.textContent; + + loader.onTestReady(test.getAttribute("id"), $.base64Decode(scriptCode)); + } else if(testGroupIndex < testGroups.length - 1) { + // We don't have tests left in this test group, so move on to the next. + testGroupIndex++; + getNextXML(); + } else { + // We're done. + loader.onTestsExhausted(); + } + } + + /* Start over at the beginning */ + this.reset = function() { + currentTestIndex = 0; + testGroupIndex = 0; } } +/* Controls test generation and running, and sends results to the presenter. */ +function Controller() { + var state = 'stopped'; + var runner = new BrowserRunner(); + var loader = new TestLoader(); + var controller = this; + runner.onComplete = function(test) { + presenter.addTestResult(test); -function sth_test(to, path) { - //Stores information in sth_test from a test definition object, and path - //TODO: Update sth framework to work more directly with test definitiion objects. - //this.testObj = to; - this.id = to.id; - this.description = to.description; - this.theTestcase = to.test; - this.path = to.path; - this.res = undefined; - this.pre = to.precondition; + if(state === 'running') + setTimeout(loader.getNextTest, 10); + } + + loader.onInitialized = function(totalTests, version, date) { + presenter.setVersion(version); + presenter.setDate(date); + presenter.setTotalTests(totalTests); + } + + loader.onLoadingNextSection = function(path) { + presenter.updateStatus("Loading: " + path); + } + + loader.onTestReady = function(id, test) { + presenter.updateStatus("Executing Test: " + id); + runner.run(id, test); + } + + loader.onTestsExhausted = function() { + state = 'stopped'; + presenter.finished(); + } + + this.start = function() { + state = 'running'; + loader.getNextTest(); + presenter.started(); + } + + this.pause = function() { + state = 'paused'; + presenter.paused(); + } + + this.reset = function() { + loader.reset(); + presenter.reset(); + } + + this.toggle = function() { + if(state === 'running') { + controller.pause(); + } else { + controller.start(); + } + } } - -//define -activeSth = new sth(window); -ES5Harness = activeSth; -loadSections(); +var controller = new Controller() + function compareArray(aExpected, aActual) { if (aActual.length != aExpected.length) { @@ -824,3 +411,56 @@ function fnGlobalObject() { return (function() { return this }).call(null); } +$(function () { + presenter.setup(); + + $('.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.) + $('.nav-link').each(function (index) { + //Adding "targetDiv" attribute to the header tab and on that basis the div related to header tabs are displayed + if (index === 0) { + $(this).attr('targetDiv', '.content-home'); + } else if (index === 1) { + $(this).attr('targetDiv', '.content-tests'); + } else if (index === 2) { + $(this).attr('targetDiv', '.content-results'); + $(this).attr('testRunning', 'false'); + } else if (index === 3) { + $(this).attr('targetDiv', '.content-dev'); + } + else { + $(this).attr('targetDiv', '.content-browsers'); + } + + //Attaching the click event to the header tab that shows the respective div of header + $(this).click(function () { + var target = $(this).attr('targetDiv'); + $('#contentContainer > div:visible').hide(); + $('.navBar .selected').toggleClass('selected'); + $(this).addClass('selected'); + $(target).show(); + + //If clicked tab is Result, it generates the results. + if ($(target).hasClass('content-results')) { + presenter.refresh(); + } + //If clicked tab is Browsers Report, it shows the reports + if (target === '.content-browsers') { + $("body").addClass("busy"); + setTimeout(function () { + buildTable(); + }, 500); + } + }); + }); + + //Attach the click event to the start button. It starts, stops and pauses the tests + $('.button-start').click(function () { + controller.toggle(); + }); + + //Attach the click event to the reset button. It reset all the test to zero + $('.button-reset').click(function () { + controller.reset(); + }); +}); diff --git a/website/resources/scripts/testcases/07_Lexical_Conventions.xml b/website/resources/scripts/testcases/07_Lexical_Conventions.xml index 67607b8b2f..2ef203e0d9 100644 --- a/website/resources/scripts/testcases/07_Lexical_Conventions.xml +++ b/website/resources/scripts/testcases/07_Lexical_Conventions.xml @@ -3,445 +3,445 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/08_Types.xml b/website/resources/scripts/testcases/08_Types.xml index 6f31407aca..12cf6042c7 100644 --- a/website/resources/scripts/testcases/08_Types.xml +++ b/website/resources/scripts/testcases/08_Types.xml @@ -3,114 +3,114 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/09_Type_Conversion.xml b/website/resources/scripts/testcases/09_Type_Conversion.xml index 8e65ece00f..4be9917ec9 100644 --- a/website/resources/scripts/testcases/09_Type_Conversion.xml +++ b/website/resources/scripts/testcases/09_Type_Conversion.xml @@ -3,133 +3,133 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/10_Execution_Contexts.xml b/website/resources/scripts/testcases/10_Execution_Contexts.xml index c035fa0e81..a61adc6299 100644 --- a/website/resources/scripts/testcases/10_Execution_Contexts.xml +++ b/website/resources/scripts/testcases/10_Execution_Contexts.xml @@ -2,93 +2,92 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/11_Expressions.xml b/website/resources/scripts/testcases/11_Expressions.xml index 7ff4fa22bb..24bd984cab 100644 --- a/website/resources/scripts/testcases/11_Expressions.xml +++ b/website/resources/scripts/testcases/11_Expressions.xml @@ -3,1091 +3,1091 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/12_Statement.xml b/website/resources/scripts/testcases/12_Statement.xml index 43969e2ec1..9f19b6decb 100644 --- a/website/resources/scripts/testcases/12_Statement.xml +++ b/website/resources/scripts/testcases/12_Statement.xml @@ -3,419 +3,419 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/13_Function_Definition.xml b/website/resources/scripts/testcases/13_Function_Definition.xml index ba821101f0..05cc454e59 100644 --- a/website/resources/scripts/testcases/13_Function_Definition.xml +++ b/website/resources/scripts/testcases/13_Function_Definition.xml @@ -3,116 +3,116 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/14_Program.xml b/website/resources/scripts/testcases/14_Program.xml index 7050b073b7..4b559a998d 100644 --- a/website/resources/scripts/testcases/14_Program.xml +++ b/website/resources/scripts/testcases/14_Program.xml @@ -3,10 +3,10 @@
- - - - - + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/15_Native.xml b/website/resources/scripts/testcases/15_Native.xml index 4f41f9ab83..b15e4d51ae 100644 --- a/website/resources/scripts/testcases/15_Native.xml +++ b/website/resources/scripts/testcases/15_Native.xml @@ -2,2678 +2,2790 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/chapter10.xml b/website/resources/scripts/testcases/chapter10.xml index f3625e74d1..fc295d3357 100644 --- a/website/resources/scripts/testcases/chapter10.xml +++ b/website/resources/scripts/testcases/chapter10.xml @@ -3,20 +3,20 @@
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/chapter11.xml b/website/resources/scripts/testcases/chapter11.xml index 19e4fd1afd..87acfb6c6c 100644 --- a/website/resources/scripts/testcases/chapter11.xml +++ b/website/resources/scripts/testcases/chapter11.xml @@ -3,58 +3,58 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/chapter12.xml b/website/resources/scripts/testcases/chapter12.xml index a9fb3071fc..e806268c56 100644 --- a/website/resources/scripts/testcases/chapter12.xml +++ b/website/resources/scripts/testcases/chapter12.xml @@ -3,32 +3,32 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/chapter15.xml b/website/resources/scripts/testcases/chapter15.xml index 94c7fd3327..a7d775fc32 100644 --- a/website/resources/scripts/testcases/chapter15.xml +++ b/website/resources/scripts/testcases/chapter15.xml @@ -3,2258 +3,2258 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/website/resources/scripts/testcases/testcaseslist.xml b/website/resources/scripts/testcases/testcaseslist.xml index e6f7160575..facf505dc6 100644 --- a/website/resources/scripts/testcases/testcaseslist.xml +++ b/website/resources/scripts/testcases/testcaseslist.xml @@ -1,4 +1,4 @@ - + resources/scripts/testcases/07_Lexical_Conventions.xml resources/scripts/testcases/08_Types.xml resources/scripts/testcases/09_Type_Conversion.xml @@ -7,7 +7,7 @@ resources/scripts/testcases/12_Statement.xml resources/scripts/testcases/13_Function_Definition.xml resources/scripts/testcases/14_Program.xml - resources/scripts/testcases/15_Native_ECMA_Script_Objects.xml + resources/scripts/testcases/15_Native.xml resources/scripts/testcases/chapter10.xml resources/scripts/testcases/chapter11.xml resources/scripts/testcases/chapter12.xml