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 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Sanity test for "catch(Indetifier) statement"
6 *
7 * @path ch12/12.14/S12.14_A4.js
8 * @description Checking if deleting an exception fails
9 * @noStrict
10 */
12 // CHECK#1
13 try {
14 throw "catchme";
15 $ERROR('#1.1: throw "catchme" lead to throwing exception');
16 }
17 catch (e) {
18 if (delete e){
19 $ERROR('#1.2: Exception has DontDelete property');
20 }
21 if (e!=="catchme") {
22 $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e );
23 }
24 }
26 // CHECK#2
27 try {
28 throw "catchme";
29 $ERROR('#2.1: throw "catchme" lead to throwing exception');
30 }
31 catch(e){}
32 try{
33 e;
34 $ERROR('#2.2: Deleting catching exception after ending "catch" block');
35 }
36 catch(err){}