B2G/gecko/toolkit/components/places/tests/queries/test_415716.js
/**
 * Builds a test database by hand using various times, annotations and
 * visit numbers for this test
 */
Builds a test database by hand using various times, annotations and
visit numbers for this test
Builds a test database by hand using various times annotations and visit numbers for this test
function buildTestDatabase() {
  let testURI = uri("http://www.foo.com");
  PlacesUtils.history.runInBatchMode({
    runBatched: function (aUserData) {
      for (let i = 0; i < 12; ++i) {
        PlacesUtils.history.addVisit(testURI, today, null, modHistoryTypes(i),
                                     false, 0);
      }
      testURI = uri("http://foo.com/youdontseeme.html");
      let testAnnoName = "moz-test-places/testing123";
      let testAnnoVal = "test";
      for (let i = 0; i < 12; ++i) {
        PlacesUtils.history.addVisit(testURI, today, null, modHistoryTypes(i),
                                     false, 0);
      }
      PlacesUtils.annotations.setPageAnnotation(testURI, testAnnoName,
                                                testAnnoVal, 0, 0);
    }
  }, null);
}
function buildTestDatabase ( ) { let testURI = uri ( "http://www.foo.com" ) ; PlacesUtils . history . runInBatchMode ( { runBatched : function ( aUserData ) { for ( let i = 0 ; i < 12 ; ++ i ) { PlacesUtils . history . addVisit ( testURI , today , null , modHistoryTypes ( i ) , false , 0 ) ; } testURI = uri ( "http://foo.com/youdontseeme.html" ) ; let testAnnoName = "moz-test-places/testing123" ; let testAnnoVal = "test" ; for ( let i = 0 ; i < 12 ; ++ i ) { PlacesUtils . history . addVisit ( testURI , today , null , modHistoryTypes ( i ) , false , 0 ) ; } PlacesUtils . annotations . setPageAnnotation ( testURI , testAnnoName , testAnnoVal , 0 , 0 ) ; } } , null ) ; }
Builds a test database by hand using various times, annotations and
 visit numbers for this test
Builds a test database by hand using various times annotations and visit numbers for this test
// This is the set of visits that we will match - our min visit is 2 so that's // why we add more visits to the same URIs.