JavaScript Tests - make javascript.options.strict tests insensitive to current setting, bug 428396

This commit is contained in:
bclary@bclary.com 2008-04-10 14:24:08 -07:00
parent 83d5c96f17
commit 3ea487affc
19 changed files with 154 additions and 36 deletions

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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
{

View File

@ -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 = {};

View File

@ -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';

View File

@ -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
{

View File

@ -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;

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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;

View File

@ -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
{