1 // Flags: --harmony_proxies
3 var common = require('../common');
4 var assert = require('assert');
5 var vm = require('vm');
7 // src/node_contextify.cc filters out the Proxy object from the parent
8 // context. Make sure that the new context has a Proxy object of its own.
10 var result = vm.runInNewContext('this.Proxy = Proxy', sandbox);
11 assert(typeof sandbox.Proxy === 'object');
12 assert(sandbox.Proxy !== Proxy);
14 // Unless we copy the Proxy object explicitly, of course.
15 var sandbox = { Proxy: Proxy };
16 var result = vm.runInNewContext('this.Proxy = Proxy', sandbox);
17 assert(typeof sandbox.Proxy === 'object');
18 assert(sandbox.Proxy === Proxy);