fixing spec
This commit is contained in:
		
					parent
					
						
							
								939885bc66
							
						
					
				
			
			
				commit
				
					
						357caf8991
					
				
			
		
					 1 changed files with 0 additions and 32 deletions
				
			
		| 
						 | 
					@ -83,38 +83,6 @@ describe('<webview> tag', function () {
 | 
				
			||||||
      document.body.appendChild(webview)
 | 
					      document.body.appendChild(webview)
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it('disables node integration when disabled on the parent BrowserWindow', function (done) {
 | 
					 | 
				
			||||||
      ipcMain.once('answer', function (event, typeofProcess) {
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
          assert.equal(typeofProcess, 'undefined')
 | 
					 | 
				
			||||||
          done()
 | 
					 | 
				
			||||||
        } finally {
 | 
					 | 
				
			||||||
          b.close()
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      var windowUrl = require('url').format({
 | 
					 | 
				
			||||||
        pathname: `${fixtures}/pages/webview-no-node-integration-on-window.html`,
 | 
					 | 
				
			||||||
        protocol: 'file',
 | 
					 | 
				
			||||||
        query: {
 | 
					 | 
				
			||||||
          p: `${fixtures}/pages/web-view-log-process.html`
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        slashes: true
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      var preload = path.join(fixtures, 'module', 'answer.js')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      var b = new BrowserWindow({
 | 
					 | 
				
			||||||
        height: 400,
 | 
					 | 
				
			||||||
        width: 400,
 | 
					 | 
				
			||||||
        show: false,
 | 
					 | 
				
			||||||
        webPreferences: {
 | 
					 | 
				
			||||||
          preload: preload,
 | 
					 | 
				
			||||||
          nodeIntegration: false
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      b.loadURL(windowUrl)
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    it('navigates to new page when changed', function (done) {
 | 
					    it('navigates to new page when changed', function (done) {
 | 
				
			||||||
      var listener = function () {
 | 
					      var listener = function () {
 | 
				
			||||||
        webview.src = 'file://' + fixtures + '/pages/b.html'
 | 
					        webview.src = 'file://' + fixtures + '/pages/b.html'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue