11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci// Regression test for https://github.com/nodejs/node/issues/10806 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_cirequire('../common'); 51cb0ef41Sopenharmony_ciconst assert = require('assert'); 61cb0ef41Sopenharmony_ciconst vm = require('vm'); 71cb0ef41Sopenharmony_ciconst ctx = vm.createContext({ open() { } }); 81cb0ef41Sopenharmony_ciconst window = vm.runInContext('this', ctx); 91cb0ef41Sopenharmony_ciconst other = 123; 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ciassert.notStrictEqual(window.open, other); 121cb0ef41Sopenharmony_ciwindow.open = other; 131cb0ef41Sopenharmony_ciassert.strictEqual(window.open, other); 141cb0ef41Sopenharmony_ciwindow.open = other; 151cb0ef41Sopenharmony_ciassert.strictEqual(window.open, other); 16