mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
JavaScript Tests - make javascript.options.strict tests insensitive to current setting, bug 428396
This commit is contained in:
parent
83d5c96f17
commit
3ea487affc
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 = {};
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user