Commit 78395bce authored by lpy's avatar lpy Committed by Commit bot

Fix layout test for redeclaration of arguments.

This patch re-enables js/mozilla/strict/13.1.html and fixes lexical
redeclaration of arguments.

BUG=v8:4577

Review-Url: https://codereview.chromium.org/2318933007
Cr-Commit-Position: refs/heads/master@{#417395}
parent 73249085
......@@ -1253,5 +1253,3 @@ crbug.com/490015 http/tests/navigation/beacon-cross-origin-redirect-blob.html [
crbug.com/490015 virtual/stable/http/tests/navigation/beacon-blob-with-non-simple-type.html [ Skip ]
# This test fails with the stable release mode.
crbug.com/490015 virtual/stable/http/tests/navigation/same-and-different-back.html [ Skip ]
crbug.com/v8/4577 fast/js/mozilla/strict/13.1.html [ NeedsManualRebaseline ]
......@@ -116,10 +116,10 @@ PASS Function("'use strict'; function f(arguments){}") threw exception of type S
PASS !!Function("function f(arguments){}") is true
PASS true === true
PASS Function("'use strict'; function f([arguments]){}") threw exception of type SyntaxError.
PASS Function("function f([arguments]){}") threw exception of type SyntaxError.
PASS !!Function("function f([arguments]){}") is true
PASS true === true
PASS Function("'use strict'; function f({x:arguments}){}") threw exception of type SyntaxError.
PASS Function("function f({x:arguments}){}") threw exception of type SyntaxError.
PASS !!Function("function f({x:arguments}){}") is true
PASS true === true
PASS Function("'use strict'; function arguments(){}") threw exception of type SyntaxError.
PASS !!Function("function arguments(){}") is true
......@@ -140,10 +140,10 @@ PASS Function("'use strict'; (function f(arguments){})") threw exception of type
PASS !!Function("(function f(arguments){})") is true
PASS true === true
PASS Function("'use strict'; (function f([arguments]){})") threw exception of type SyntaxError.
PASS Function("(function f([arguments]){})") threw exception of type SyntaxError.
PASS !!Function("(function f([arguments]){})") is true
PASS true === true
PASS Function("'use strict'; (function f({x:arguments}){})") threw exception of type SyntaxError.
PASS Function("(function f({x:arguments}){})") threw exception of type SyntaxError.
PASS !!Function("(function f({x:arguments}){})") is true
PASS true === true
PASS Function("'use strict'; (function arguments(){})") threw exception of type SyntaxError.
PASS !!Function("(function arguments(){})") is true
......@@ -176,10 +176,10 @@ PASS Function("'use strict'; ({set x(arguments){}})") threw exception of type Sy
PASS !!Function("({set x(arguments){}})") is true
PASS true === true
PASS Function("'use strict'; ({set x([arguments]){}})") threw exception of type SyntaxError.
PASS Function("({set x([arguments]){}})") threw exception of type SyntaxError.
PASS !!Function("({set x([arguments]){}})") is true
PASS true === true
PASS Function("'use strict'; ({set x({x:arguments}){}})") threw exception of type SyntaxError.
PASS Function("({set x({x:arguments}){}})") threw exception of type SyntaxError.
PASS !!Function("({set x({x:arguments}){}})") is true
PASS true === true
PASS Function("'use strict'; ({set x(arguments){\"use strict\";}})") threw exception of type SyntaxError.
PASS Function("({set x(arguments){\"use strict\";}})") threw exception of type SyntaxError.
......
......@@ -229,15 +229,12 @@ assertEq(testLenientAndStrict('function f(arguments){}',
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
// BUG(v8:4577): In sloppy mode, we currently throw when destructuring
// parameters include 'arguments', even if a direct argument named
// 'arguments' is accepted, once the --harmony-sloppy flag is shipped.
assertEq(testLenientAndStrict('function f([arguments]){}',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('function f({x:arguments}){}',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('function arguments(){}',
......@@ -267,11 +264,11 @@ assertEq(testLenientAndStrict('(function f(arguments){})',
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('(function f([arguments]){})',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('(function f({x:arguments}){})',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('(function arguments(){})',
......@@ -321,11 +318,11 @@ assertEq(testLenientAndStrict('({set x(arguments){}})',
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('({set x([arguments]){}})',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('({set x({x:arguments}){}})',
parseRaisesException(SyntaxError),
parsesSuccessfully,
parseRaisesException(SyntaxError)),
true);
assertEq(testLenientAndStrict('({set x(arguments){"use strict";}})',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment