B2G/gecko/browser/base/content/test/browser_bug561636.js
/**
 * In this test, we check that no popup appears if the form is valid.
 */
In this test, we check that no popup appears if the form is valid.
In this test we check that no popup appears if the form is valid .
function test1() {
  let uri = "data:text/html,<html><body><iframe name='t'></iframe><form target='t' action='data:text/html,'><input><input id='s' type='submit'></form></body></html>";
  let tab = gBrowser.addTab();
  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
    let doc = gBrowser.contentDocument;
    doc.getElementById('s').click();
    executeSoon(function() {
      checkPopupHide();
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test2);
    });
  }, true);
  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}
function test1 ( ) { let uri = "data:text/html,<html><body><iframe name='t'></iframe><form target='t' action='data:text/html,'><input><input id='s' type='submit'></form></body></html>" ; let tab = gBrowser . addTab ( ) ; tab . linkedBrowser . addEventListener ( "load" , function ( aEvent ) { tab . linkedBrowser . removeEventListener ( "load" , arguments . callee , true ) ; let doc = gBrowser . contentDocument ; doc . getElementById ( 's' ) . click ( ) ; executeSoon ( function ( ) { checkPopupHide ( ) ; gBrowser . removeTab ( gBrowser . selectedTab ) ; executeSoon ( test2 ) ; } ) ; } , true ) ; gBrowser . selectedTab = tab ; gBrowser . selectedTab . linkedBrowser . loadURI ( uri ) ; }
In this test, we check that no popup appears if the form is valid.
In this test we check that no popup appears if the form is valid .
// Clean-up // Next test