aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js
new file mode 100644
index 000000000..901e3c830
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/13_Function_Definition/13.2_Creating_Function_Objects/S13.2.2_A19_T3.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S13.2.2_A19_T3;
+* @section: 13.2.2;
+* @assertion: Function's scope chain is started when it is declared;
+* @description: Function is declared in the object scope and then an exception is thrown;
+*/
+
+var a = 1;
+
+var __obj = {a:2};
+
+try {
+ with (__obj)
+ {
+ var __func = function (){return a;};
+ throw 3;
+ }
+} catch (e) {
+ ;
+}
+
+result = __func();
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (result !== 2) {
+ $ERROR('#1: result === 2. Actual: result ==='+result);
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+