these tests were valid tests of best practices, but not of the
normative spec. We moved these to a new bestPractices directory and
added a new not-yet-operational @bestPractices property.
- juneDate and decemberDate were both one month off. Fixed
- LocalTZA wasn't actually LocalTZA as defined in ES5. If we were in DST when
this was created, LocalTZA was off by one hour. Fixed
- GetSundayInMonth was completely busted (i.e., arithmetic operations on the 'count'
param which happens to be a string). Fixed(?)
- DaylightSzavingTA was defined incorrectly. It assumed the local time zone adjustment
hadn't been accounted for. This wasn't how UTC was calling it. Fixed(?)
etc, because the substitution logic in test262.py operates on the
source after prepending framework.js.
The plan is to replace sputnikLib.js with framework.js. Also, the
substitution logic in test262.py should probably be fixed to apply the
substitution before prepending.
assertTrue became assertTruthy. Canonical form of doc-comment attribute value source no longer have a leading colon and trailing semicolon. Any existing such are stripped during conversion.
morning. The rewrite of "function testcase()..." now puts the
assertTrue at the bottom. Preconditions, names, and ids are
removed. And the path in the file is ignored, and is instead set
accurately according to where the file is found.
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
if (!strict_mode) { throw new SyntaxError('unspecified case'); }
This doesn't work for a few reasons:
1. 'strict_mode' is undefined in the test case exeuction context. That is, the test framework
does not force the test case into strict mode
2. The test case code looks like:
"use strict";
if (!strict_mode) ...
...
Note that 'strict_mode' is not set before being accessed
Really the metadata for these test cases should have a "@strict" property added to instruct the test
framework *not* to run the test if an implementation doesn't support strict mode.
tests covering a given chapter, N, without delving into subsections. This in turn
broken the Results page which was by default displaying individual results for chapters
13(.0) and 14(.0). Fixed.
directory next*
SputnikConverter:
- ES5TestCase.cs
* Case of JSON-based property names was wrong. Fixed
* Use the tests' 'id' instead of 'path' as the GlobalScopeTests keys
* Added 'id' and 'path' as Global Scope test metadata. The correct/clean solution here is to simply use 'path'
as the key to GlobalScopeTests, but this refactoring needs to be undertaken later when we can convert the
'normal' test cases over to use 'path' as the key as well
* Turns out we cannot depend on the message received by window.onerror to have some form of "syntax"
contained within it. Instead, we'll just rely on the regular expression ".", matches any one character,
for the short term
- SputnikTestCase.cs
* Same case issue as for ES5TestCases.cs
* Don't trust the Sputnik metadata for the ES5 section name or even test case id to be correct. Instead,
generate this information from the file path of the test case
TestCasePackager.py:
- added a new global, GLOBAL_SCOPE_FILES, which is a list of JS files found directly under test\suite\*.js
which include metadata for so-called globally scoped tests. These files are imported directly by the HTML
test harness
test\suite\*:
- regenerated Sputnik tests based on new converter
default.html:
- import SputnikGlobalScope.js. Really TestCasePackager.py should generate the global scope imports to
default.html automatically...
website\resources\scripts\testcases\*:
- test cases have shuffled from existing *.json files into globalscope.json
their test case objects. Created an automated tool, FixPathsAndIds.py,
to fix these.
TestCasePackager.py no longer throws when it encounters a non-*.js
file where it expects test cases. Instead, it simply ignores it.
ES5 chapter. That is, ecma-262-toc.xml now has '.0' sections for all chapters
and I've manually modified (Sputnik Ch. 13 & 14) test case id's and paths
to utilize the '.0' suffix. Long term, SputnikConverter needs to perform
this transformation itself though.
to the following criteria:
1. If a test case directory directly contains *.js files at the root level, package
the entire directory as an XML regardless of how many *.js files are in
subdirectories
2. If the directory and subdirectories contain less than 1,000 test cases, package
the entire directory as an XML. Otherwise...
3. Perform steps 1 and 2 on each subdirectory of the directory
The net effect of this change is that no test case XMLs are larger than 1.5 megs any longer,
although the total number of test XMLs has jumped from about a dozen to ~75. This should
make running the test harness seem a little smoother across all browsers since we won't be
blocked downloading 4 meg files for several seconds any longer.
were actually unique across the test cases. This *was* needed prior to November as we weren't
running each test case in it's own private global environment. The situation now is that
we're running each test within it's own iframe => the modifications are no longer needed.
Few small improvements to SputnikConverter:
- App.config file locations have been fixed
- template files get pushed alongside generated tool binaries
- the root path for Sputnik conformance files is "Conformance", not "tests"
- allow the main exe to throw exceptions so they can be properly debugged with VS
"?sitedebug" to the end of the Test262 URL.
There's a mismatch between the Test262 test harness and IE Test Center's harness
which invalidated 15.4.4.17-5-1.js, 15.4.4.18-5-1.js, and 15.4.4.20-5-1.js on Test262.
Essentially what's going on is Test262 uses the 'window' object as 'this' for the test
case functions whereas IE Test Center uses the test case object housing the test case
function as this. This causes problems for test cases pertaining to scoping. I've gone
ahead and adjusted the Test262 tests to expect 'window' to be 'this', and will be updating
IE Test Center's harness to use the 'window' object as well so we don't run into this
problem again.
of the tests. Emit this to the activity bar
test\harness\sta.js: too many years of Python had me thinking JavaScript arrays have an append method:) Fixed.
Also, added a pickled representation of all test helper functions found in this file
test\harness\sth.js: detached most test helper functions from the iframe's document object (as globals) and
inject these into the actual test cases. It's a bit slower and not as elegant, but it is
cleaner from an ES5 purist perspective. Still need to move Sputnik helper functions into
sta.js
Extended Controller such that it now measures overall test execution time. Such a change
is very useful for measuring performance-impact changes such as the aforementioned
improvement
- test\harness\sth.js: fixed a bug spotted by Mark Miller. In short, we were allowing
a test case return value of 'undefined' to be successful WRT IE Test Center tests because
Sputnik tests normally return undefined (successful or not). We now differentiate between
Sputnik/IE Test Center when evaluating return values
website\* out to test\*:
- Removed test\harness\ECMA-262-TOC.xml. The casing on this file was incorrect, but
more importantly it's a static file not generated by the harness
- Populated test\harness with the contents of website\resources\scripts\global\. In
the future, we need to update test\harness\* and propagate these changes out to
website\*
- Test\suite\ietestcenter is now a verbatim copy of the IE Test Center tests that
WERE under website\resources\scripts\testcases\*
- Moved all Sputnik tests from website\resources\scripts\testcases\* out to
test\suite\sputnik_converted
- Moved website\resources\scripts\testcases\excludelist.xml out to test\config\*. This
particular file was only used for the test conversion process to XML, and is not actually
needed by the website as best as I can tell
- Website\resources\scripts\testcases now only contains the XMLized test cases. This is
the right thing to do as the *.js files here weren't actually being used by the website
and the general public can now peruse the test cases directly via Mercurial
- external\contributions\: test contributions to Test262 from external entities such as Microsoft and Google.
This directory consists of the external tests without any modifications
- test\harness\: test harness used to run Test262 tests. Presently web-based
- test\suite\: suite of vendor-neutral ECMAScript test cases conforming to the ES5 spec
- tools\: among other things this includes a set of tools used to convert various external test
contributions to a format the Test262 test harness can consume
- website\: an archived copy of the http://test262.ecmascript.org website