1'use strict'; 2// Regression test for https://github.com/nodejs/node/issues/10806 3 4require('../common'); 5const assert = require('assert'); 6const vm = require('vm'); 7const ctx = vm.createContext({ open() { } }); 8const window = vm.runInContext('this', ctx); 9const other = 123; 10 11assert.notStrictEqual(window.open, other); 12window.open = other; 13assert.strictEqual(window.open, other); 14window.open = other; 15assert.strictEqual(window.open, other); 16