function testWebRequestAPIAddListener() {
  var webview = new WebView();

  [webview.request.onBeforeRequest,
   webview.request.onBeforeSendHeaders,
   webview.request.onSendHeaders,
   webview.request.onHeadersReceived,
   webview.request.onAuthRequired,
   webview.request.onBeforeRedirect,
   webview.request.onCompleted,
   webview.request.onErrorOccurred,
  ].forEach(function(event) {
    event.addListener(function(){}, {urls: ['<all_urls>']});
  });

  webview.onloadstop = function() { embedder.test.succeed(); };
  webview.src = 'about:blank';
  document.body.appendChild(webview);
}
// Tests that calling addListener() succeeds on all WebRequest API events.
Tests that calling addListener() succeeds on all WebRequest API events.
Tests that calling addListener () succeeds on all WebRequest API events .
function testWebRequestAPIAddListener() {
  var webview = new WebView();
  [webview.request.onBeforeRequest,
   webview.request.onBeforeSendHeaders,
   webview.request.onSendHeaders,
   webview.request.onHeadersReceived,
   webview.request.onAuthRequired,
   webview.request.onBeforeRedirect,
   webview.request.onCompleted,
   webview.request.onErrorOccurred,
  ].forEach(function(event) {
    event.addListener(function(){}, {urls: ['<all_urls>']});
  });
  webview.onloadstop = function() { embedder.test.succeed(); };
  webview.src = 'about:blank';
  document.body.appendChild(webview);
}
function testWebRequestAPIAddListener ( ) { var webview = new WebView ( ) ; [ webview . request . onBeforeRequest , webview . request . onBeforeSendHeaders , webview . request . onSendHeaders , webview . request . onHeadersReceived , webview . request . onAuthRequired , webview . request . onBeforeRedirect , webview . request . onCompleted , webview . request . onErrorOccurred , ] . forEach ( function ( event ) { event . addListener ( function ( ) { } , { urls : [ '<all_urls>' ] } ) ; } ) ; webview . onloadstop = function ( ) { embedder . test . succeed ( ) ; } ; webview . src = 'about:blank' ; document . body . appendChild ( webview ) ; }
Tests that calling addListener() succeeds on all WebRequest API events.
Tests that calling addListener () succeeds on all WebRequest API events .