From 9643b2a5c52e4d81b4d267920cd78f42027244a1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 25 Apr 2017 13:52:56 -0700 Subject: [PATCH] Add specs for window.open frameName argument --- spec/chromium-spec.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index b0ae69af51f..1b88d78e2ab 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -371,6 +371,26 @@ describe('chromium feature', function () { window.open('', '', {toString: 3}) }, /Cannot convert object to primitive value/) }) + + it('sets the window title to the specified frameName', function (done) { + let b + app.once('browser-window-created', (event, createdWindow) => { + assert.equal(createdWindow.getTitle(), 'hello') + b.close() + done() + }) + b = window.open('', 'hello') + }) + + it('does not throw an exception when the frameName is a built-in object property', function (done) { + let b + app.once('browser-window-created', (event, createdWindow) => { + assert.equal(createdWindow.getTitle(), '__proto__') + b.close() + done() + }) + b = window.open('', '__proto__') + }) }) describe('window.opener', function () {