blob: 4cdb8286843f9790622a75a176e98e9e18a41222 [file] [log] [blame]
duke6e45e102007-12-01 00:00:00 +00001if (key == undefined || key != 'engine value') {
2 throw "unexpected engine scope value";
3}
4
5// pre-defined context variable refers to current ScriptContext
6if (context.getAttribute('key', context.GLOBAL_SCOPE) != 'global value') {
7 throw "unexpected global scope value";
8}
9
10// change the engine scope value
11key = 'new engine value';
12
13if (context.getAttribute('key', context.GLOBAL_SCOPE) != 'global value') {
14 throw "global scope should not change here";
15}
16
17// delete engine scope value
18delete key;
19
20if (key == undefined && key != 'xglobal value') {
21 throw 'global scope should be visible after engine scope removal';
22}