function testCloseNewWindowCleanup() {
  chrome.app.window.create('appwindow.html', {
    width: 640,
    height: 480
  }, function(appWindow) {
    appWindow.contentWindow.onload = function(evt) {
      var webview = appWindow.contentWindow.document.querySelector('webview');
      webview.addEventListener('loadstop', function(evt) {
        // Close the second app window, which should not trigger the whole
        // embedder process to be cleaned up.
        appWindow.contentWindow.close();
        embedder.test.succeed();
      });
      webview.src = 'about:blank';
    };
  });
}
// webview in that window is cleaned up, and not the entire embedder process.
webview in that window is cleaned up, and not the entire embedder process.
webview in that window is cleaned up and not the entire embedder process .
function testCloseNewWindowCleanup() {
  chrome.app.window.create('appwindow.html', {
    width: 640,
    height: 480
  }, function(appWindow) {
    appWindow.contentWindow.onload = function(evt) {
      var webview = appWindow.contentWindow.document.querySelector('webview');
      webview.addEventListener('loadstop', function(evt) {
        appWindow.contentWindow.close();
        embedder.test.succeed();
      });
      webview.src = 'about:blank';
    };
  });
}
function testCloseNewWindowCleanup ( ) { chrome . app . window . create ( 'appwindow.html' , { width : 640 , height : 480 } , function ( appWindow ) { appWindow . contentWindow . onload = function ( evt ) { var webview = appWindow . contentWindow . document . querySelector ( 'webview' ) ; webview . addEventListener ( 'loadstop' , function ( evt ) { appWindow . contentWindow . close ( ) ; embedder . test . succeed ( ) ; } ) ; webview . src = 'about:blank' ; } ; } ) ; }
webview in that window is cleaned up, and not the entire embedder process.
webview in that window is cleaned up and not the entire embedder process .
// Close the second app window, which should not trigger the whole // embedder process to be cleaned up.