B2G/gecko/toolkit/components/url-classifier/tests/unit/test_addsub.js
// Test a duplicate add chunk.
Test a duplicate add chunk.
Test a duplicate add chunk .
function testDuplicateAddChunks() {
  var addUrls1 = [ "foo.com/a" ];
  var addUrls2 = [ "bar.com/b" ];
  var update = buildPhishingUpdate(
        [
          { "chunkNum" : 1,
            "urls" : addUrls1
          },
          { "chunkNum" : 1,
            "urls" : addUrls2
          }]);
  var assertions = {
    "tableData" : "test-phish-simple;a:1",
    "urlsExist" : addUrls1,
    "urlsDontExist" : addUrls2
  };
  doTest([update], assertions);
}
function testDuplicateAddChunks ( ) { var addUrls1 = [ "foo.com/a" ] ; var addUrls2 = [ "bar.com/b" ] ; var update = buildPhishingUpdate ( [ { "chunkNum" : 1 , "urls" : addUrls1 } , { "chunkNum" : 1 , "urls" : addUrls2 } ] ) ; var assertions = { "tableData" : "test-phish-simple;a:1" , "urlsExist" : addUrls1 , "urlsDontExist" : addUrls2 } ; doTest ( [ update ] , assertions ) ; }
Test a duplicate add chunk.
Test a duplicate add chunk .