2012-02-29 23:23:47 +01:00
|
|
|
/// Copyright (c) 2012 Ecma International. All rights reserved.
|
|
|
|
/// Ecma International makes this code available under the terms and conditions set
|
|
|
|
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
|
|
|
|
/// "Use Terms"). Any redistribution of this code must retain the above
|
|
|
|
/// copyright and this notice and otherwise comply with the Use Terms.
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
|
|
|
|
//Error Detector
|
2011-09-27 01:12:46 +02:00
|
|
|
if (this.window!==undefined) { //for console support
|
2011-10-03 21:08:06 +02:00
|
|
|
this.window.onerror = function(errorMsg, url, lineNumber) {
|
|
|
|
this.window.iframeError = errorMsg;
|
|
|
|
};
|
test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
case validator). This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
which are implementation details, and which are unequivocally test262-specific. I've also added,
openErrorWindow, which will be used to open a descriptive error message window for each test case
failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains! Instead, we load the file
directly from sth.js. The performance of fnGlobalObject has been improved. Finally, the ES5Harness
object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
to handle test case failures in their own way (e.g., log to the filesystem). The 'run' function was
basically re-written
Added 37 new test cases from the "IE Test Center" Build release. There were 14 modifications to
existing test cases as well. Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.
TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter. Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 20:18:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//This doesn't work with early errors in current versions of Opera
|
|
|
|
/*
|
|
|
|
if (/opera/i.test(navigator.userAgent)) {
|
|
|
|
(function() {
|
|
|
|
var origError = window.Error;
|
|
|
|
window.Error = function() {
|
|
|
|
if (arguments.length>0) {
|
|
|
|
try {
|
|
|
|
window.onerror(arguments[0]);
|
|
|
|
} catch(e) {
|
|
|
|
alert("Failed to invoke window.onerror (from ed.js)");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return origError.apply(this, arguments);
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
}*/
|