Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / mozilla / strict / script-tests / B.1.1.js
blobf762c9caf6cf4530e061d6b7206b886f265134d5
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /*
4 * Any copyright is dedicated to the Public Domain.
5 * http://creativecommons.org/licenses/publicdomain/
6 */
8 /* Octal integer literal at top level. */
9 assertEq(testLenientAndStrict('010',
10 parsesSuccessfully,
11 parseRaisesException(SyntaxError)),
12 true);
14 /* Octal integer literal in strict function body */
15 assertEq(parseRaisesException(SyntaxError)
16 ('function f() { "use strict"; 010; }'),
17 true);
21 * Octal integer literal after strict function body (restoration of
22 * scanner state)
24 assertEq(parsesSuccessfully('function f() { "use strict"; }; 010'),
25 true);
27 /* Octal integer literal in function body */
28 assertEq(parsesSuccessfully('function f() { 010; }'),
29 true);
31 reportCompare(true, true);
33 var successfullyParsed = true;