diff --git a/js/tests/ecma/LexicalConventions/7.4.3-14-n.js b/js/tests/ecma/LexicalConventions/7.4.3-14-n.js index 8d5af29edee3..84ab7bd28afe 100644 --- a/js/tests/ecma/LexicalConventions/7.4.3-14-n.js +++ b/js/tests/ecma/LexicalConventions/7.4.3-14-n.js @@ -68,8 +68,14 @@ var prefValue; print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/ecma/LexicalConventions/7.4.3-4-n.js b/js/tests/ecma/LexicalConventions/7.4.3-4-n.js index b17b06f2e909..7d9475cb1a1b 100644 --- a/js/tests/ecma/LexicalConventions/7.4.3-4-n.js +++ b/js/tests/ecma/LexicalConventions/7.4.3-4-n.js @@ -68,8 +68,14 @@ var prefValue; print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/ecma/LexicalConventions/7.4.3-7-n.js b/js/tests/ecma/LexicalConventions/7.4.3-7-n.js index 31239d561ada..5f5636ef5e4f 100644 --- a/js/tests/ecma/LexicalConventions/7.4.3-7-n.js +++ b/js/tests/ecma/LexicalConventions/7.4.3-7-n.js @@ -68,8 +68,14 @@ var prefValue; print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/ecma/LexicalConventions/7.4.3-9-n.js b/js/tests/ecma/LexicalConventions/7.4.3-9-n.js index 4fee9c8c4a91..b75cf1c0e67b 100644 --- a/js/tests/ecma/LexicalConventions/7.4.3-9-n.js +++ b/js/tests/ecma/LexicalConventions/7.4.3-9-n.js @@ -72,8 +72,14 @@ EXPECTED = "error"; print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/ecma_2/Exceptions/lexical-011.js b/js/tests/ecma_2/Exceptions/lexical-011.js index 544f3bb98138..7f01041c41c3 100644 --- a/js/tests/ecma_2/Exceptions/lexical-011.js +++ b/js/tests/ecma_2/Exceptions/lexical-011.js @@ -65,8 +65,14 @@ writeHeaderToLog( SECTION + " "+ TITLE); print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var result = "Failed"; var exception = "No exception thrown"; diff --git a/js/tests/ecma_2/Exceptions/lexical-014.js b/js/tests/ecma_2/Exceptions/lexical-014.js index ef686f560996..880d2800e5b1 100644 --- a/js/tests/ecma_2/Exceptions/lexical-014.js +++ b/js/tests/ecma_2/Exceptions/lexical-014.js @@ -65,8 +65,14 @@ writeHeaderToLog( SECTION + " "+ TITLE); print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var result = "Failed"; var exception = "No exception thrown"; diff --git a/js/tests/ecma_2/Exceptions/lexical-016.js b/js/tests/ecma_2/Exceptions/lexical-016.js index 53b351448ba0..021594d0521e 100644 --- a/js/tests/ecma_2/Exceptions/lexical-016.js +++ b/js/tests/ecma_2/Exceptions/lexical-016.js @@ -65,8 +65,14 @@ writeHeaderToLog( SECTION + " "+ TITLE); print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var result = "Failed"; var exception = "No exception thrown"; diff --git a/js/tests/ecma_2/Exceptions/lexical-021.js b/js/tests/ecma_2/Exceptions/lexical-021.js index ce134c0afd7b..47a0725a0970 100644 --- a/js/tests/ecma_2/Exceptions/lexical-021.js +++ b/js/tests/ecma_2/Exceptions/lexical-021.js @@ -65,8 +65,14 @@ writeHeaderToLog( SECTION + " "+ TITLE); print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var result = "Failed"; var exception = "No exception thrown"; diff --git a/js/tests/ecma_2/LexicalConventions/keywords-001.js b/js/tests/ecma_2/LexicalConventions/keywords-001.js index 367beab6f62a..7362613783fc 100644 --- a/js/tests/ecma_2/LexicalConventions/keywords-001.js +++ b/js/tests/ecma_2/LexicalConventions/keywords-001.js @@ -54,8 +54,14 @@ startTest(); print("This test requires option javascript.options.strict enabled"); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var result = "failed"; diff --git a/js/tests/ecma_3/Object/8.6.1-01.js b/js/tests/ecma_3/Object/8.6.1-01.js index 49aa3395f467..2897ece55561 100755 --- a/js/tests/ecma_3/Object/8.6.1-01.js +++ b/js/tests/ecma_3/Object/8.6.1-01.js @@ -51,8 +51,14 @@ var actual = ''; var expect = 's.length is read-only'; var status = summary + ': Throw if STRICT and WERROR is enabled'; -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/js1_5/Exceptions/regress-315147.js b/js/tests/js1_5/Exceptions/regress-315147.js index b35dfc04598e..b7b2c2931e2a 100755 --- a/js/tests/js1_5/Exceptions/regress-315147.js +++ b/js/tests/js1_5/Exceptions/regress-315147.js @@ -45,8 +45,14 @@ var expect = 'ReferenceError'; printBugNumber(BUGNUMBER); printStatus (summary); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var o = {}; diff --git a/js/tests/js1_5/Regress/regress-306633.js b/js/tests/js1_5/Regress/regress-306633.js index 6be76349a0c7..15f160070a28 100755 --- a/js/tests/js1_5/Regress/regress-306633.js +++ b/js/tests/js1_5/Regress/regress-306633.js @@ -45,8 +45,14 @@ var expect = ''; printBugNumber(BUGNUMBER); printStatus (summary); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} expect = 'SyntaxError'; diff --git a/js/tests/js1_5/Regress/regress-317533.js b/js/tests/js1_5/Regress/regress-317533.js index 5577728a9a0d..e8b6d64e9f9d 100755 --- a/js/tests/js1_5/Regress/regress-317533.js +++ b/js/tests/js1_5/Regress/regress-317533.js @@ -47,8 +47,14 @@ printStatus (summary); var code; -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/js1_5/Regress/regress-323314-1.js b/js/tests/js1_5/Regress/regress-323314-1.js index 67fdcc909581..c83ccfc9e628 100755 --- a/js/tests/js1_5/Regress/regress-323314-1.js +++ b/js/tests/js1_5/Regress/regress-323314-1.js @@ -45,8 +45,14 @@ var expect = ''; printBugNumber(BUGNUMBER); printStatus (summary); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} var xyzzy; diff --git a/js/tests/js1_5/Regress/regress-352197.js b/js/tests/js1_5/Regress/regress-352197.js index 5e84bb90643f..ebbfb9a4fa66 100755 --- a/js/tests/js1_5/Regress/regress-352197.js +++ b/js/tests/js1_5/Regress/regress-352197.js @@ -45,8 +45,14 @@ var expect = 'TypeError: function f does not always return a value'; printBugNumber(BUGNUMBER); printStatus (summary); -options('strict'); -options('werror'); +if (!options().match(/strict/)) +{ + options('strict'); +} +if (!options().match(/werror/)) +{ + options('werror'); +} try { diff --git a/js/tests/js1_5/extensions/regress-365869.js b/js/tests/js1_5/extensions/regress-365869.js index 7dba4b059c3b..288da4be157c 100755 --- a/js/tests/js1_5/extensions/regress-365869.js +++ b/js/tests/js1_5/extensions/regress-365869.js @@ -53,8 +53,14 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); - options('strict'); - options('werror'); + if (!options().match(/strict/)) + { + options('strict'); + } + if (!options().match(/werror/)) + { + options('werror'); + } try { diff --git a/js/tests/js1_5/extensions/regress-367923.js b/js/tests/js1_5/extensions/regress-367923.js index e54be034a209..1287ffa22bf9 100755 --- a/js/tests/js1_5/extensions/regress-367923.js +++ b/js/tests/js1_5/extensions/regress-367923.js @@ -55,8 +55,14 @@ function test() print('This test will fail in Gecko prior to 1.9'); - options('strict'); - options('werror'); + if (!options().match(/strict/)) + { + options('strict'); + } + if (!options().match(/werror/)) + { + options('werror'); + } try { diff --git a/js/tests/js1_5/extensions/regress-382509.js b/js/tests/js1_5/extensions/regress-382509.js index 8343f9cb1f7b..5b7851032c27 100755 --- a/js/tests/js1_5/extensions/regress-382509.js +++ b/js/tests/js1_5/extensions/regress-382509.js @@ -55,6 +55,15 @@ function test() printBugNumber(BUGNUMBER); printStatus (summary); + if (options().match(/strict/)) + { + options('strict'); + } + if (options().match(/werror/)) + { + options('werror'); + } + global.foo = eval; global.a = 'global'; expect = 'global indirect'; @@ -76,6 +85,7 @@ function test() options('strict'); options('werror'); + try { var foo = eval; diff --git a/js/tests/js1_7/block/regress-347559.js b/js/tests/js1_7/block/regress-347559.js index fb519e91392a..292d5b694f8f 100755 --- a/js/tests/js1_7/block/regress-347559.js +++ b/js/tests/js1_7/block/regress-347559.js @@ -58,8 +58,14 @@ function test() actual = 'No Warning'; expect = 'No Warning'; - options('strict'); - options('werror'); + if (!options().match(/strict/)) + { + options('strict'); + } + if (!options().match(/werror/)) + { + options('werror'); + } try {