function testMailtoLink() {
  var webview = new WebView();
  webview.src = embedder.mailtoTestURL;

  webview.onloadstop = function() {
    webview.onloadabort = function(e) {
      // The mailto link should not trigger a loadabort.
      if (e.url.substring(0, 7) == 'mailto:') {
        embedder.test.fail();
      }
    };
    webview.onloadstop = function() {
      // If mailto links are disabled, then |webview.src| will now be
      // 'about:blank'.
      embedder.test.assertFalse(webview.src == 'about:blank');
      embedder.test.succeed();
    };
    webview.executeScript({code:'document.getElementById("mailto").click()'});
  };

  document.body.appendChild(webview);
}
// This test verifies that mailto links are enabled.
This test verifies that mailto links are enabled.
This test verifies that mailto links are enabled .
function testMailtoLink() {
  var webview = new WebView();
  webview.src = embedder.mailtoTestURL;
  webview.onloadstop = function() {
    webview.onloadabort = function(e) {
      if (e.url.substring(0, 7) == 'mailto:') {
        embedder.test.fail();
      }
    };
    webview.onloadstop = function() {
      embedder.test.assertFalse(webview.src == 'about:blank');
      embedder.test.succeed();
    };
    webview.executeScript({code:'document.getElementById("mailto").click()'});
  };
  document.body.appendChild(webview);
}
function testMailtoLink ( ) { var webview = new WebView ( ) ; webview . src = embedder . mailtoTestURL ; webview . onloadstop = function ( ) { webview . onloadabort = function ( e ) { if ( e . url . substring ( 0 , 7 ) == 'mailto:' ) { embedder . test . fail ( ) ; } } ; webview . onloadstop = function ( ) { embedder . test . assertFalse ( webview . src == 'about:blank' ) ; embedder . test . succeed ( ) ; } ; webview . executeScript ( { code : 'document.getElementById("mailto").click()' } ) ; } ; document . body . appendChild ( webview ) ; }
This test verifies that mailto links are enabled.
This test verifies that mailto links are enabled .
// The mailto link should not trigger a loadabort. // If mailto links are disabled, then |webview.src| will now be // 'about:blank'.