From 1f9c67fb3aa792a79ffe1ab1b051257bf32f2617 Mon Sep 17 00:00:00 2001 From: Mark Miller Date: Wed, 9 Nov 2011 12:02:28 -0800 Subject: Revise opera crash exclusions to exclude only the test that causes the crash --- test/config/excludelist.xml | 4 +--- test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/config/excludelist.xml b/test/config/excludelist.xml index 947ea8f89..4b0fee7db 100644 --- a/test/config/excludelist.xml +++ b/test/config/excludelist.xml @@ -1,8 +1,6 @@  - Opera crash - to be investigated - Opera crash - to be investigated - Opera crash - to be investigated + Opera12pre-alpha1116 crash - to be investigated JS to JSON conversion issue diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js index d369b69b2..c80624e16 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js @@ -11,7 +11,7 @@ function construct(f, args) { var bound = Function.prototype.bind.apply(f, [null].concat(args)); return new bound(); } -var d = construct(Date, [1957, 5, 27]); +var d = construct(Date, [1957, 4, 27]); if (Object.prototype.toString.call(d) !== '[object Date]') { $ERROR('Using the Date constructor via .bind did not create a Date.'); } -- cgit v1.2.1 From c6a4e6846327dbb070353f0d7fa95a69d59d97e8 Mon Sep 17 00:00:00 2001 From: David Fugate Date: Fri, 11 Nov 2011 11:40:05 -0800 Subject: Fixed https://bugs.ecmascript.org/show_bug.cgi?id=207. --- test/harness/sth.js | 43 ++++++++++++++++++++++++++++++++++++++++++- website/harness/sth.js | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/test/harness/sth.js b/test/harness/sth.js index 491eeedf5..48222d071 100644 --- a/test/harness/sth.js +++ b/test/harness/sth.js @@ -99,6 +99,45 @@ function BrowserRunner() { /* Run the test. */ this.run = function (test, code) { + + //--Detect proper window.onerror support + if (instance.supportsWindowOnerror===undefined) { + var iframePrereqs = document.createElement("iframe"); + iframePrereqs.setAttribute("id", "prereqsIframe"); + if (!/firefox/i.test(navigator.userAgent)) { + iframePrereqs.setAttribute("style", "display:none"); + } + document.body.appendChild(iframePrereqs); + + var iwinPrereqs = iframePrereqs.contentWindow; + var idocPrereqs = iwinPrereqs.document; + idocPrereqs.open(); + + iwinPrereqs.failCount = 0; + + var stuff = [ + "window.onerror = function(a, b, c) { this.failCount++; }", + "va xyz =", + "throw Error();" + ]; + + for(var i in stuff) { + idocPrereqs.writeln(""); + } + idocPrereqs.close(); + + //TODO - 500ms *should* be a sufficient delay + setTimeout(function() { + instance.supportsWindowOnerror = iwinPrereqs.failCount === 2; + //alert(iwinPrereqs.failCount); + document.body.removeChild(iframePrereqs); + instance.run(test, code); + }, 500); + return; + } + currentTest = {}; for (var tempIndex in test) { if (test.hasOwnProperty(tempIndex)) { @@ -106,6 +145,8 @@ function BrowserRunner() { } } currentTest.code = code; + + iframe = document.createElement("iframe"); iframe.setAttribute("id", "runnerIframe"); @@ -167,7 +208,7 @@ function BrowserRunner() { //Run the code idoc.writeln(""); + } + idocPrereqs.close(); + + //TODO - 500ms *should* be a sufficient delay + setTimeout(function() { + instance.supportsWindowOnerror = iwinPrereqs.failCount === 2; + //alert(iwinPrereqs.failCount); + document.body.removeChild(iframePrereqs); + instance.run(test, code); + }, 500); + return; + } + currentTest = {}; for (var tempIndex in test) { if (test.hasOwnProperty(tempIndex)) { @@ -106,6 +145,8 @@ function BrowserRunner() { } } currentTest.code = code; + + iframe = document.createElement("iframe"); iframe.setAttribute("id", "runnerIframe"); @@ -167,7 +208,7 @@ function BrowserRunner() { //Run the code idoc.writeln("