From ea2273dde59891211bfde8b5dc602dba677a8f5e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 15 Dec 2016 15:23:45 -0800 Subject: [PATCH] Assert built-in prototype isolation --- spec/api-browser-window-spec.js | 8 ++++++-- spec/fixtures/api/isolated-preload.js | 4 +++- spec/fixtures/api/isolated.html | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 6332406..39d262b 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1845,13 +1845,17 @@ describe('BrowserWindow module', function () { preloadProperty: 'number', pageProperty: 'undefined', typeofRequire: 'function', - typeofProcess: 'object' + typeofProcess: 'object', + typeofArrayPush: 'function', + typeofFunctionApply: 'function', }, pageContext: { preloadProperty: 'undefined', pageProperty: 'string', typeofRequire: 'undefined', - typeofProcess: 'undefined' + typeofProcess: 'undefined', + typeofArrayPush: 'number', + typeofFunctionApply: 'boolean', } }) done() diff --git a/spec/fixtures/api/isolated-preload.js b/spec/fixtures/api/isolated-preload.js index 8cb80d3..c92be35 100644 --- a/spec/fixtures/api/isolated-preload.js +++ b/spec/fixtures/api/isolated-preload.js @@ -8,7 +8,9 @@ window.addEventListener('message', (event) => { preloadProperty: typeof window.foo, pageProperty: typeof window.hello, typeofRequire: typeof require, - typeofProcess: typeof process + typeofProcess: typeof process, + typeofArrayPush: typeof Array.prototype.push, + typeofFunctionApply: typeof Function.prototype.apply }, pageContext: event.data }) diff --git a/spec/fixtures/api/isolated.html b/spec/fixtures/api/isolated.html index bb0aca9..b2d2b4e 100644 --- a/spec/fixtures/api/isolated.html +++ b/spec/fixtures/api/isolated.html @@ -5,11 +5,15 @@ Isolated World -- 2.7.4