Last change
on this file was 2, checked in by dmik, 15 years ago |
Imported OpenJDK 6 b19 sources from Oracle.
|
File size:
632 bytes
|
Line | |
---|
1 | if (key == undefined || key != 'engine value') {
|
---|
2 | throw "unexpected engine scope value";
|
---|
3 | }
|
---|
4 |
|
---|
5 | // pre-defined context variable refers to current ScriptContext
|
---|
6 | if (context.getAttribute('key', context.GLOBAL_SCOPE) != 'global value') {
|
---|
7 | throw "unexpected global scope value";
|
---|
8 | }
|
---|
9 |
|
---|
10 | // change the engine scope value
|
---|
11 | key = 'new engine value';
|
---|
12 |
|
---|
13 | if (context.getAttribute('key', context.GLOBAL_SCOPE) != 'global value') {
|
---|
14 | throw "global scope should not change here";
|
---|
15 | }
|
---|
16 |
|
---|
17 | // delete engine scope value
|
---|
18 | delete key;
|
---|
19 |
|
---|
20 | if (key == undefined && key != 'xglobal value') {
|
---|
21 | throw 'global scope should be visible after engine scope removal';
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.