author | duke |
Wed, 05 Jul 2017 23:23:09 +0200 | |
changeset 44981 | 30e75693ae99 |
parent 34721 | 59801fbd042e |
permissions | -rw-r--r-- |
34721
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
1 |
/* |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
2 |
* This is the test JavaScript program used in jjs-strictTest.sh |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
3 |
*/ |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
4 |
|
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
5 |
try { |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
6 |
v = "hello"; |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
7 |
throw new Error("should have thrown ReferenceError"); |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
8 |
} catch (e) { |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
9 |
if (! (e instanceof ReferenceError)) { |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
10 |
throw new Error("ReferenceError expected, got " + e); |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
11 |
} |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
12 |
} |