diff --git a/js/tests/e4x/browser.js b/js/tests/e4x/browser.js index f4f5007f954a..b0ebf591227e 100644 --- a/js/tests/e4x/browser.js +++ b/js/tests/e4x/browser.js @@ -117,6 +117,10 @@ function reportSuccess(section, expected, actual) function reportError(msg, page, line) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof SUMMARY == 'undefined') { @@ -150,6 +154,9 @@ function reportError(msg, page, line) } reportFailure(SECTION, msg); + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + }; @@ -219,6 +226,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/ecma/browser.js b/js/tests/ecma/browser.js index a4d5081e65ea..377be6f508a4 100644 --- a/js/tests/ecma/browser.js +++ b/js/tests/ecma/browser.js @@ -115,6 +115,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -150,6 +154,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -175,6 +183,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/ecma_2/browser.js b/js/tests/ecma_2/browser.js index dbb972209dbe..1e7573304f8f 100644 --- a/js/tests/ecma_2/browser.js +++ b/js/tests/ecma_2/browser.js @@ -114,6 +114,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -149,6 +153,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -174,6 +182,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/ecma_3/browser.js b/js/tests/ecma_3/browser.js index 1b3f33f5cafe..fdef8b6973ea 100755 --- a/js/tests/ecma_3/browser.js +++ b/js/tests/ecma_3/browser.js @@ -121,6 +121,10 @@ var _reportFailure = reportFailure; reportFailure = function (msg, page, line) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (gInReportCompare) { @@ -160,6 +164,9 @@ reportFailure = function (msg, page, line) _reportFailure(msg); } + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + }; function quit() @@ -181,6 +188,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js-test-driver-begin.js b/js/tests/js-test-driver-begin.js index 14d7055e9809..d0b0c09f4a05 100644 --- a/js/tests/js-test-driver-begin.js +++ b/js/tests/js-test-driver-begin.js @@ -102,5 +102,34 @@ function outputscripttag(src, attribute, value, ise4x) document.write(s); } +function jsTestDriverEnd() +{ + // gDelayTestDriverEnd is used to + // delay collection of the test result and + // signal to Spider so that tests can continue + // to run after page load has fired. They are + // responsible for setting gDelayTestDriverEnd = true + // then when completed, setting gDelayTestDriverEnd = false + // then calling jsTestDriverEnd() + + if (gDelayTestDriverEnd) + { + return; + } + + if (window.opener && window.opener.runNextTest) + { + if (window.opener.reportCallBack) + { + window.opener.reportCallBack(window.opener.gWindow); + } + setTimeout('window.opener.runNextTest()', 250); + } + else + { + gPageCompleted = true; + } +} + init(); diff --git a/js/tests/js-test-driver-end.js b/js/tests/js-test-driver-end.js index a09b5ac01c44..19a910c34d8a 100644 --- a/js/tests/js-test-driver-end.js +++ b/js/tests/js-test-driver-end.js @@ -1,32 +1,3 @@ -function jsTestDriverEnd() -{ - // gDelayTestDriverEnd is used to - // delay collection of the test result and - // signal to Spider so that tests can continue - // to run after page load has fired. They are - // responsible for setting gDelayTestDriverEnd = true - // then when completed, setting gDelayTestDriverEnd = false - // then calling jsTestDriverEnd() - - if (gDelayTestDriverEnd) - { - return; - } - - if (window.opener && window.opener.runNextTest) - { - if (window.opener.reportCallBack) - { - window.opener.reportCallBack(window.opener.gWindow); - } - setTimeout('window.opener.runNextTest()', 250); - } - else - { - gPageCompleted = true; - } -} - jsTestDriverEnd(); diff --git a/js/tests/js1_1/browser.js b/js/tests/js1_1/browser.js index 77c3220d1ecd..57fd9db4f4c7 100644 --- a/js/tests/js1_1/browser.js +++ b/js/tests/js1_1/browser.js @@ -110,6 +110,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -145,6 +149,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } function version(v) { @@ -168,6 +176,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_2/browser.js b/js/tests/js1_2/browser.js index cb5887d72795..f8bc02efb949 100644 --- a/js/tests/js1_2/browser.js +++ b/js/tests/js1_2/browser.js @@ -114,6 +114,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -149,6 +153,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -174,6 +182,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_3/browser.js b/js/tests/js1_3/browser.js index 24213fb69234..9a6298e4ec6a 100644 --- a/js/tests/js1_3/browser.js +++ b/js/tests/js1_3/browser.js @@ -114,6 +114,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -149,6 +153,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } function version(v) @@ -172,6 +180,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_4/browser.js b/js/tests/js1_4/browser.js index 29ba18bbce25..97676849d212 100644 --- a/js/tests/js1_4/browser.js +++ b/js/tests/js1_4/browser.js @@ -113,6 +113,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -148,6 +152,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -173,6 +181,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_5/browser.js b/js/tests/js1_5/browser.js index 70abeee0d89d..2d24721835c3 100755 --- a/js/tests/js1_5/browser.js +++ b/js/tests/js1_5/browser.js @@ -121,6 +121,10 @@ var _reportFailure = reportFailure; reportFailure = function (msg, page, line) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (gInReportCompare) { @@ -157,6 +161,9 @@ reportFailure = function (msg, page, line) } _reportFailure(msg); + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + }; function gc() @@ -172,6 +179,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_6/browser.js b/js/tests/js1_6/browser.js index da22e177e432..630c1236c450 100755 --- a/js/tests/js1_6/browser.js +++ b/js/tests/js1_6/browser.js @@ -122,6 +122,10 @@ var _reportFailure = reportFailure; reportFailure = function (msg, page, line) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (gInReportCompare) { @@ -161,6 +165,9 @@ reportFailure = function (msg, page, line) _reportFailure(msg); } + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + }; function gc() @@ -176,6 +183,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/js1_7/browser.js b/js/tests/js1_7/browser.js index da22e177e432..630c1236c450 100755 --- a/js/tests/js1_7/browser.js +++ b/js/tests/js1_7/browser.js @@ -122,6 +122,10 @@ var _reportFailure = reportFailure; reportFailure = function (msg, page, line) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (gInReportCompare) { @@ -161,6 +165,9 @@ reportFailure = function (msg, page, line) _reportFailure(msg); } + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + }; function gc() @@ -176,6 +183,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/lc2/browser.js b/js/tests/lc2/browser.js index d1287c0ba4b4..40367d3a2e51 100644 --- a/js/tests/lc2/browser.js +++ b/js/tests/lc2/browser.js @@ -119,6 +119,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -154,6 +158,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -179,6 +187,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) diff --git a/js/tests/lc3/browser.js b/js/tests/lc3/browser.js index f0503e8a7aa1..4ae5162d479c 100755 --- a/js/tests/lc3/browser.js +++ b/js/tests/lc3/browser.js @@ -112,6 +112,10 @@ var gExceptionExpected = false; function err( msg, page, line ) { var testcase; + var jsOptions = new JavaScriptOptions(); + + jsOptions.setOption('strict', false); + jsOptions.setOption('werror', false); if (typeof(EXPECTED) == "undefined" || EXPECTED != "error") { /* @@ -147,6 +151,10 @@ function err( msg, page, line ) { testcase.reason += "Error: " + msg + " Source File: " + page + " Line: " + line + "."; stopTest(); + + gDelayTestDriverEnd = false; + jsTestDriverEnd(); + } var gVersion = 0; @@ -172,6 +180,7 @@ function gc() } catch(ex) { + writeLineToLog('gc: ' + ex); // Thanks to igor.bukanov@gmail.com var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i)