@@ -339,8 +339,8 @@ describe('browser-window module', function () {
339
339
w = new BrowserWindow ( {
340
340
show : false ,
341
341
frame : false ,
342
- width : 300 ,
343
- height : 300
342
+ width : 400 ,
343
+ height : 400
344
344
} )
345
345
var size = [ 400 , 400 ]
346
346
w . setContentSize ( size [ 0 ] , size [ 1 ] )
@@ -351,23 +351,29 @@ describe('browser-window module', function () {
351
351
} )
352
352
353
353
describe ( 'BrowserWindow.setContentBounds(bounds)' , function ( ) {
354
- it ( 'sets the content size and position' , function ( ) {
355
- var bounds = { x : 100 , y : 100 , width : 400 , height : 400 }
354
+ it ( 'sets the content size and position' , function ( done ) {
355
+ var bounds = { x : 60 , y : 60 , width : 250 , height : 250 }
356
+ w . once ( 'resize' , function ( ) {
357
+ assert . deepEqual ( w . getContentBounds ( ) , bounds )
358
+ done ( )
359
+ } )
356
360
w . setContentBounds ( bounds )
357
- assert . deepEqual ( w . getContentBounds ( ) , bounds )
358
361
} )
359
362
360
- it ( 'works for a frameless window' , function ( ) {
363
+ it ( 'works for a frameless window' , function ( done ) {
361
364
w . destroy ( )
362
365
w = new BrowserWindow ( {
363
366
show : false ,
364
367
frame : false ,
365
368
width : 300 ,
366
369
height : 300
367
370
} )
368
- var bounds = { x : 100 , y : 100 , width : 400 , height : 400 }
371
+ var bounds = { x : 60 , y : 60 , width : 250 , height : 250 }
372
+ w . once ( 'resize' , function ( ) {
373
+ assert . deepEqual ( w . getContentBounds ( ) , bounds )
374
+ done ( )
375
+ } )
369
376
w . setContentBounds ( bounds )
370
- assert . deepEqual ( w . getContentBounds ( ) , bounds )
371
377
} )
372
378
} )
373
379
0 commit comments