spec: Make the will-navigate test run faster
This commit is contained in:
		
					parent
					
						
							
								353cdd967a
							
						
					
				
			
			
				commit
				
					
						f716d47e54
					
				
			
		
					 2 changed files with 6 additions and 6 deletions
				
			
		|  | @ -295,14 +295,14 @@ describe 'browser-window module', -> | |||
|       w.minimize() | ||||
| 
 | ||||
|   describe 'will-navigate event', -> | ||||
|     return if isCI and process.platform is 'darwin' | ||||
|     it 'emits when user starts a navigation', (done) -> | ||||
|     @timeout 10000 | ||||
|       w.webContents.on 'will-navigate', (event, url) -> | ||||
|     it 'emits when user starts a navigation', (done) -> | ||||
|       url = "file://#{fixtures}/pages/will-navigate.html" | ||||
|       w.webContents.on 'will-navigate', (event, u) -> | ||||
|         event.preventDefault() | ||||
|         assert.equal url, 'https://www.github.com/' | ||||
|         assert.equal u, url | ||||
|         done() | ||||
|       w.loadUrl "file://#{fixtures}/pages/will-navigate.html" | ||||
|       w.loadUrl url | ||||
| 
 | ||||
|   describe 'beginFrameSubscription method', -> | ||||
|     it 'subscribes frame updates', (done) -> | ||||
|  |  | |||
							
								
								
									
										2
									
								
								spec/fixtures/pages/will-navigate.html
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								spec/fixtures/pages/will-navigate.html
									
										
									
									
										vendored
									
									
								
							|  | @ -1,7 +1,7 @@ | |||
| <html> | ||||
| <body> | ||||
| <script type="text/javascript" charset="utf-8"> | ||||
|   location = 'https://www.github.com' | ||||
|   location.reload(); | ||||
| </script> | ||||
| </body> | ||||
| </html> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao