fix: replace default frameName title with null check (#27521)

* refactor: replace default frameName title with null check

* add isNativeWindowOpen check in makeBrowserWindowOptions

* modify snapshot test files

* replace title with frame-name again for proxy - not native open

* modify proxy snapshot title key-value to come after height key-value
This commit is contained in:
Michaela Laurencin
2021-01-29 05:24:30 -08:00
committed by GitHub
parent 40aeb0d994
commit 357becd113
4 changed files with 24 additions and 22 deletions

View File

@@ -5,11 +5,11 @@
"sender": "[WebContents]"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"width": 800,
"title": "frame name",
"title": "cool",
"backgroundColor": "blue",
"focusable": false,
"webPreferences": {
@@ -43,11 +43,11 @@
"sender": "[WebContents]"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"width": 800,
"title": "frame name",
"title": "cool",
"backgroundColor": "blue",
"focusable": false,
"webPreferences": {
@@ -80,11 +80,11 @@
"sender": "[WebContents]"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"width": 800,
"title": "frame name",
"title": "cool",
"backgroundColor": "gray",
"focusable": false,
"webPreferences": {
@@ -115,7 +115,7 @@
"sender": "[WebContents]"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"width": 800,
@@ -150,11 +150,11 @@
"sender": "[WebContents]"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"width": 800,
"title": "frame name",
"title": "cool",
"backgroundColor": "blue",
"focusable": false,
"webPreferences": {

View File

@@ -7,13 +7,13 @@
"processId": "placeholder-process-id"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"show": true,
"title": "frame name",
"width": 800,
"height": 600,
"title": "frame-name",
"top": 5,
"left": 10,
"resizable": false,
@@ -42,13 +42,13 @@
"processId": "placeholder-process-id"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"show": true,
"title": "frame name",
"width": 800,
"height": 600,
"title": "frame-name",
"resizable": false,
"x": 0,
"y": 10,
@@ -76,13 +76,13 @@
"processId": "placeholder-process-id"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"show": true,
"title": "frame name",
"width": 800,
"height": 600,
"title": "frame-name",
"backgroundColor": "gray",
"webPreferences": {
"nodeIntegration": false,
@@ -110,13 +110,13 @@
"processId": "placeholder-process-id"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"show": true,
"title": "sup",
"width": 800,
"height": 600,
"title": "sup",
"x": 50,
"y": 20,
"webPreferences": {
@@ -142,13 +142,13 @@
"processId": "placeholder-process-id"
},
"about:blank",
"frame name",
"frame-name",
"new-window",
{
"show": false,
"title": "frame name",
"width": 800,
"height": 600,
"title": "frame-name",
"top": 1,
"left": 1,
"x": 1,

View File

@@ -10,7 +10,7 @@ function genSnapshot (browserWindow: BrowserWindow, features: string) {
browserWindow.webContents.on('new-window', (...args: any[]) => {
resolve([features, ...args]);
});
browserWindow.webContents.executeJavaScript(`window.open('about:blank', 'frame name', '${features}') && true`);
browserWindow.webContents.executeJavaScript(`window.open('about:blank', 'frame-name', '${features}') && true`);
});
}