function addTests(webviews) {
  // The first test makes sure that the webviews in the same storage partition
  // (webviews[0] and webviews[1]) can find each other via
  // window.open('', <frame name>).  This is a regression test for
  // https://crbug.com/794079.
  test1 = new Testing.Test('window.open_findability_between_webview[0]and[1]',
      function(callBack) {
        askWebviewToSetWindowName(webviews[1], "test1-webviews1", function() {
          askWebviewToFindWindowByName(
              webviews[0], "test1-webviews1", function(found) {
                // Windows should be findable if they are in the same storage
                // partition.
                callBack(found == true);
              });
        });
      });
  // The second test makes sure that the webviews in a different storage
  // partition (webviews[0] and webviews[2]) can NOT find each other via
  // window.open('', <frame name>).
  test2 = new Testing.Test('window.open_findability_between_webview[0]and[2]',
      function(callBack) {
        askWebviewToSetWindowName(webviews[2], "test2-webviews2", function() {
          askWebviewToFindWindowByName(
              webviews[0], "test2-webviews2", function(found) {
                // Windows shouldn't be findable across different storage
                // partitions.
                callBack(found == false);
              });
        });
      });
  // Link the tests so that they will run one after another.
  test1.setNextTest(test2);
  test2.setNextTest(null); // End of all tests.
  window.firstTest = test1; // The first test to run.
}
// The test logics are defined here.
The test logics are defined here.
The test logics are defined here .
function addTests(webviews) {
  test1 = new Testing.Test('window.open_findability_between_webview[0]and[1]',
      function(callBack) {
        askWebviewToSetWindowName(webviews[1], "test1-webviews1", function() {
          askWebviewToFindWindowByName(
              webviews[0], "test1-webviews1", function(found) {
                callBack(found == true);
              });
        });
      });
  test2 = new Testing.Test('window.open_findability_between_webview[0]and[2]',
      function(callBack) {
        askWebviewToSetWindowName(webviews[2], "test2-webviews2", function() {
          askWebviewToFindWindowByName(
              webviews[0], "test2-webviews2", function(found) {
                callBack(found == false);
              });
        });
      });
  test1.setNextTest(test2);
  test2.setNextTest(null); 
  window.firstTest = test1; 
}
function addTests ( webviews ) { test1 = new Testing . Test ( 'window.open_findability_between_webview[0]and[1]' , function ( callBack ) { askWebviewToSetWindowName ( webviews [ 1 ] , "test1-webviews1" , function ( ) { askWebviewToFindWindowByName ( webviews [ 0 ] , "test1-webviews1" , function ( found ) { callBack ( found == true ) ; } ) ; } ) ; } ) ; test2 = new Testing . Test ( 'window.open_findability_between_webview[0]and[2]' , function ( callBack ) { askWebviewToSetWindowName ( webviews [ 2 ] , "test2-webviews2" , function ( ) { askWebviewToFindWindowByName ( webviews [ 0 ] , "test2-webviews2" , function ( found ) { callBack ( found == false ) ; } ) ; } ) ; } ) ; test1 . setNextTest ( test2 ) ; test2 . setNextTest ( null ) ; window . firstTest = test1 ; }
The test logics are defined here.
The test logics are defined here .
// The first test makes sure that the webviews in the same storage partition // (webviews[0] and webviews[1]) can find each other via // window.open('', <frame name>).  This is a regression test for // https://crbug.com/794079. // Windows should be findable if they are in the same storage // partition. // The second test makes sure that the webviews in a different storage // partition (webviews[0] and webviews[2]) can NOT find each other via // window.open('', <frame name>). // Windows shouldn't be findable across different storage // partitions. // Link the tests so that they will run one after another. // End of all tests. // The first test to run.