File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
tests/automatic_tests/fast_open_and_close_devtools Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Test Case For Fast Open&Close Devtools Crashes</ title >
6+ </ head >
7+ < body >
8+ < script type ="text/javascript ">
9+ var win = require ( 'nw.gui' ) . Window . get ( ) ;
10+ win . showDevTools ( ) ;
11+ win . closeDevTools ( ) ;
12+ win . showDevTools ( ) ;
13+ var gui = require ( 'nw.gui' ) ;
14+ gui . App . quit ( ) ;
15+ </ script >
16+ </ body >
17+ </ html >
Original file line number Diff line number Diff line change 1+ var path = require ( 'path' ) ;
2+ var assert = require ( 'assert' ) ;
3+ var spawn = require ( 'child_process' ) . spawn ;
4+ var result = false ;
5+ describe ( 'Fast open&close devtools from #1391' , function ( ) {
6+ before ( function ( done ) {
7+ this . timeout ( 0 ) ;
8+ var app = spawn ( process . execPath , [ path . join ( global . tests_dir , 'fast_open_and_close_devtools' ) ] ) ;
9+ app . on ( 'exit' , function ( code ) {
10+ if ( code != null )
11+ result = true ;
12+ done ( ) ;
13+ } ) ;
14+ } ) ;
15+
16+ it ( 'should not crash' , function ( ) {
17+ assert . equal ( result , true ) ;
18+ } ) ;
19+ } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " nw" ,
3+ "main" : " index.html"
4+ }
You can’t perform that action at this time.
0 commit comments