Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /**
8 File Name: lexical-004.js
9 Corresponds To: ecma/LexicalExpressions/7.4.1-1-n.js
10 ECMA Section: 7.4.1
12 Description:
14 Reserved words cannot be used as identifiers.
16 ReservedWord ::
17 Keyword
18 FutureReservedWord
19 NullLiteral
20 BooleanLiteral
22 Author: christine@netscape.com
23 Date: 12 november 1997
25 */
26 var SECTION = "lexical-004";
27 var VERSION = "JS1_4";
28 var TITLE = "Keywords";
30 startTest();
31 writeHeaderToLog( SECTION + " "+ TITLE);
33 var result = "Failed";
34 var exception = "No exception thrown";
35 var expect = "Passed";
37 try {
38 eval("var null = true;");
39 } catch ( e ) {
40 result = expect;
41 exception = e.toString();
42 }
44 new TestCase(
45 SECTION,
46 "var null = true" +
47 " (threw " + exception +")",
48 expect,
49 result );
51 test();