B2G/gecko/toolkit/components/url-classifier/tests/unit/test_addsub.js
// because of a pending sub chunk.
because of a pending sub chunk.
because of a pending sub chunk .
function testSubPartiallyMatches2()
{
  var addUrls = ["foo.com/a"];
  var subUrls = ["1:foo.com/a", "2:foo.com/b"];
  var addUrls2 = ["foo.com/b"];
  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls" : addUrls }]);
  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls" : subUrls }]);
  var addUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "urls" : addUrls2 }]);
  var assertions = {
    "tableData" : "test-phish-simple;a:1-2:s:1",
    "urlsDontExist" : ["foo.com/a", "foo.com/b"],
    "subsDontExist" : ["foo.com/a", "foo.com/b"]
  };
  doTest([addUpdate, subUpdate, addUpdate2], assertions);
}
function testSubPartiallyMatches2 ( ) { var addUrls = [ "foo.com/a" ] ; var subUrls = [ "1:foo.com/a" , "2:foo.com/b" ] ; var addUrls2 = [ "foo.com/b" ] ; var addUpdate = buildPhishingUpdate ( [ { "chunkNum" : 1 , "urls" : addUrls } ] ) ; var subUpdate = buildPhishingUpdate ( [ { "chunkNum" : 1 , "chunkType" : "s" , "urls" : subUrls } ] ) ; var addUpdate2 = buildPhishingUpdate ( [ { "chunkNum" : 2 , "urls" : addUrls2 } ] ) ; var assertions = { "tableData" : "test-phish-simple;a:1-2:s:1" , "urlsDontExist" : [ "foo.com/a" , "foo.com/b" ] , "subsDontExist" : [ "foo.com/a" , "foo.com/b" ] } ; doTest ( [ addUpdate , subUpdate , addUpdate2 ] , assertions ) ; }
because of a pending sub chunk.
because of a pending sub chunk .