function testLoadProgressEvent() {
  var webview = document.createElement('webview');
  var progress = 0;

  webview.addEventListener('loadstop', function(evt) {
    embedder.test.assertEq(1, progress);
    embedder.test.succeed();
  });

  webview.addEventListener('loadprogress', function(evt) {
    progress = evt.progress;
  });

  webview.setAttribute('src', 'data:text/html,trigger navigation');
  document.body.appendChild(webview);
}
// Tests that the 'loadprogress' event is triggered correctly.
Tests that the 'loadprogress' event is triggered correctly.
Tests that the ' loadprogress ' event is triggered correctly .
function testLoadProgressEvent() {
  var webview = document.createElement('webview');
  var progress = 0;
  webview.addEventListener('loadstop', function(evt) {
    embedder.test.assertEq(1, progress);
    embedder.test.succeed();
  });
  webview.addEventListener('loadprogress', function(evt) {
    progress = evt.progress;
  });
  webview.setAttribute('src', 'data:text/html,trigger navigation');
  document.body.appendChild(webview);
}
function testLoadProgressEvent ( ) { var webview = document . createElement ( 'webview' ) ; var progress = 0 ; webview . addEventListener ( 'loadstop' , function ( evt ) { embedder . test . assertEq ( 1 , progress ) ; embedder . test . succeed ( ) ; } ) ; webview . addEventListener ( 'loadprogress' , function ( evt ) { progress = evt . progress ; } ) ; webview . setAttribute ( 'src' , 'data:text/html,trigger navigation' ) ; document . body . appendChild ( webview ) ; }
Tests that the 'loadprogress' event is triggered correctly.
Tests that the ' loadprogress ' event is triggered correctly .