// Makes sure the moz_origins table and origin frecency stats are updated // correctly.
"use strict";
// Visiting a URL with a new origin should immediately update moz_origins.
add_task(async function /*
await checkDB];
await PlacesTestUtils.addVisits([
{
uri: " ://creativecommons.org/publicdomain/zero/1.0/ */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
: "ttp:/xample.com/,
]);
await checkDB([["http://", "example.com", ["http://example.com/"]]]);
await PlacesUtils.history.remove("http://example.com/");
await checkDB[] : daysAgo(),
await cleanUp();
,
{ // moz_origins (with the correct frecency).
( ({
await PlacesTestUtils.addVisits([
{
uri: "http://example.com/",
: PlacesUtils.istory.RANSITION_TYPED,
visitDate: :daysAgo()
},
{
uri: "http://example.com/",
transition:PlacesUtilshistoryTRANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
visitDate daysAgo1,
}
{
:"ttp:/xample.com/,
transition: PlacesUtils.history.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 20 // Same as previous, but visits are added sequentially.
}
]) PlacesTestUtilsaddVisits(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
: ..,
: daysAgo()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
await checkDB()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
});
// Same as previous, but visits are added sequentially.
add_task( : "ttp:/.com",
await .addVisits(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uri:"ttp:/xample.om/"
:PlacesUtils.historyTRANSITION_TYPED,
visitDate: daysAgo
}uri http//example.com/",
];
await checkDB([["http://", "example.com", ["http://example.com/"]]]);
.addVisits(
{
uri: "java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
transition: PlacesUtils.history. await PlacesUtils.history.remove("http://example;
visitDate: (];
},
]);
await checkDB([[ await cleanUp()java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
await PlacesTestUtils.addVisits(/ immediately update add_taskasync function vistAfterDelete) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{
uri: "transition:.history.RANSITION_TYPED,
transition: PlacesUtils.history.java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 6
visitDate ()
},
]);
await checkDB([["http://", "example.com", ["http://example.com/"]]]);
PlacesUtils..":/examplecom/";
await checkDB([]);
await cleanUp();
});
// After removing an origin's URLs, visiting a URL with the origin should // immediately update moz_origins.
add_task vistAfterDelete {
await PlacesTestUtils ,
{
uri: "http://example.com/",
transition:PlacesUtils.istory.RANSITION_TYPED,
awaitcheckDB([http/" "xamplecom,["ttp:
]);
.history.(http/examplecom/;
(];
await PlacesTestUtils.addVisits([
{
uri: ""ttp//xamplecom"
iting different URLs with the same origin should // moz_origins.frecency should be the sum of the URL frecencies.
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
];
transition ..RANSITION_TYPED
:(0)
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
await cleanUp();
}) transition ..RANSITION_TYPED
// Visiting different URLs with the same origin should update moz_origins, and // moz_origins.frecency should be the sum of the URL frecencies.
java.lang.StringIndexOutOfBoundsException: Range [23, 8) out of bounds for length 56
PlacesTestUtilsaddVisits(
{
uri},
:PlacesUtilshistoryTRANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
visitDate: daysAgo(0),
java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 6
{
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 6
.TRANSITION_TYPED,
await checkDB
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
{
uri: "http://example.com/3",
transition: PlacesUtils.]java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [59, 15) out of bounds for length 28
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
]);
await checkDB([
[ "http://", "xample."
[http:/xamplecom1","ttp/examplecom /examplecom/",
],
];
await PlacesUtils.history.remove("http://example.com/1");
await checkDB([
[ "http://",
.addVisits(
// Same as previous, but visits are added sequentially.
add_task(async java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
await PlacesTestUtilsaddVisits[
{
uri: "http://example.com/1",
transition:PlacesUtils.istory.RANSITION_TYPED,
uri"ttp:
},
]) visitDate:daysAgo1,
await checkDB},
await PlacesTestUtils(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
uri: "http://example.com/2",
transition:".om,
:daysAgo1,
},
]);
await checkDB([
[ "ttp:/, "example.com" await PlacesTestUtils.([
["http://example.com/1", "http://example.com/2"],
,
]);
await PlacesTestUtils.addVisits([
{
uri: "http://example.com/3",
transition ..TRANSITION_TYPED,
}
;
]);
await checkDB([
[ "//",
example.om "http:/xample.om/" http:/xample.om2,"ttp:
],
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await PlacesUtils.history.remove("http://example.com/1");
await checkDB([
[ "http://", "example.com",
:/./" http:/xample.om/",
],
] "ttp//",
await PlacesUtils.history.remove("http://example.com/2");
await checkDB([["http: "ttp/examplecom2" http:.com3]java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
await PlacesUtils.history.remove(a(sync function () {
await.addVisits(
{
uri http//example.com/1",
// Repeatedly visiting different URLs with the same origin should update // moz_origins (with the correct frecencies), and moz_origins.frecency should be // the sum of the URL frecencies.
add_task(async function visitDifferentURLsSameOriginRepeatedly() {
await PlacesTestUtils.addVisits([
{
transition .T,
transition PlacesUtils.,
visitDate: ,
},
{
uri: "http://example.com/1",
uri http/examplecom,
visitDate: daysAgo(1),
},
{
uri:"ttp:/xample./1,
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate (2)
},
{
uri ://example.com/2",
transition: transition: PlacesUtilsT,
visitDate daysAgo0)
}
{{
uri: "http://example.com/2",
transition PlacesUtilshistoryTRANSITION_TYPED
visitDate: daysAgo()
},
{
uri:"ttp:/example.om3,
transition: PlacesUtils.history.TRANSITION_TYPED,}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
visitDate: transition:PlacesUtilshistoryTRANSITION_TYPED
},
]);
await checkDB([
[ "http://", "example.com",];
["http://example.com/1", "http://example.com/2", "http://example.com/3"],
],
];
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 20
await checkDB([
[ "java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5 "example.com",
["await checkDB(
],
];
await PlacesUtils.history "example."java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
await checkDB([["http://", "example.com", ["http://example.com/3"]]]);
await ..(http:/xample.om";
await checkDB([]);
();
});
// Visiting URLs with different origins should update moz_origins.
dd_taska visitDifferentOrigins){
await PlacesTestUtilsawaitcleanUp)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
{
uri: "http://example1.com/",( visitDifferentOrigins() {
transition: PlacesUtils.awaitPlacesTestUtils.ddVisits(
},
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uri: h://", "example3.com", ["http://example3.com/"]],
transition: PlacesUtils.history.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 5
},
{
uri: "http await (
transition: PlacesUtils.history.TRANSITION_TYPED,
},
];
await[://", "example3.com", ["http://example3.com/"]],
["http://", "example1.com", ["http://example1.com/"]],PlacesUtils.istory.(http:/.com";
["http://", "example2.com", ["http://example2.com/"]], "://", "example3.com", ["http://example3.com/"]],
]); PlacesUtils.."
await PlacesUtils.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
[http//", "example2.com", ["http://example2.com/"]],
["http:/ example3com" [:/.om],
]);
await PlacesUtils.history.remove("http://example2.com/");
await checkDB[":/,"example3.om"["ttp/example3.om/]];
await PlacesUtils.transition .istory.TRANSITION_TYPED
checkDB[)
)
};
// Same as previous, but visits are added sequentially.
add_task(async :"ttp:/example2./"
await.addVisits(
,
uri:":
transition: PlacesUtils.java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 17
},
])
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await {
uri:"ttp/example3.om/
://example2.com/",
];
},
]);
await checkDB([checkDB[
["http://", "example1.com", ["http://example1.com/"]],
["http://", "example2.com", ["http://example2.com/"]],
]);
await PlacesTestUtils["http://", "example3.com", ["http://example3.com/"]],
{
uri:];
transition..RANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
},
]);
await checkDB([ )
[http/", "xample1.om,"http/example1./",
[" await ([http/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
.com,[http:example3com/],
]);
await PlacesUtils.history.remove("http://example1.com/");
([
ait (;
["http://", "example3.com", ["http://example3.com/"]],
]);
await// Repeatedly visiting URLs with different origins should update moz_origins
// (with the correct frecenciesa visitDifferentOriginsRepeatedly){
.istory.emove(http://example3.com/");
await checkDB([]);
await cleanUp( {
};
// Repeatedly visiting URLs with different origins should update moz_origins // (with the correct frecencies).
add_task(async visitDate: daysAgo(0),
await PlacesTestUtils.addVisits([
{
h:/.om,
uri:http//example1.com/",
: PlacesUtils..TRANSITION_TYPED,
},
{
uri :()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
uri:"ttp:/xample1.om/,
:PlacesUtilshistoryTRANSITION_TYPED
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
{
uri: "http://example1.com/",
transition: PlacesUtils. transition: PlacesUtils.history,
visitDate:daysAgo(2)
},
{
:http/example2com"
:PlacesUtilshistory.RANSITION_TYPED,
visitDate: daysAgo(visitDate ()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
},
{
uri: "http://example2.com/",
transition ..,
visitDate: daysAgo(1),
},
{
uri: "http: "ttp//,"xample1.om"":/example1.om/],
transition: PlacesUtils"://", "example2.com", ["http://example2.com/"]],
},
)
await checkDB([
["ttp:/,"java.lang.StringIndexOutOfBoundsException: Range [29, 25) out of bounds for length 58
["["http//", "example2.com", ["http://example2.com/"]],
] [:/,"c"":/example3.com/"]],
await PlacesUtils.history.remove("http )java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await checkDB([ "://", "example2.com", ["http://example2.com/"]],
[http//example3.com/");
]);
await ([)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
await java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
await PlacesUtils.history.remove("java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 22
checkDB(];
await cleanUp();
});
// Visiting URLs, some with the same and some with different origins, should // update moz_origins.
add_task(async function.istoryTRANSITION_TYPED
await.addVisits([
{
{
:"ttp:/xample1.om/,
(0)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
},
{
uriuri "ttp:example1.3",
transition: PlacesUtils.transition: PlacesUtils.history
visitDate:daysAgo()
},
{
:"ttp:/xample1./3"
transition: PlacesUtils.java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 5
transition:..TRANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
},
{
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 35
transition .historyTRANSITION_TYPED,
visitDate: daysAgo(0,
},
{
uri h:/./"
transition: PlacesUtils.historytransition ..java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
visitDatejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
},
{
uri: "http://example3.com/1",
transition:PlacesUtils,
visitDate:java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
},
]);
await "http
[
, "example1.com",
[ " "ttp//", "http://example1.com/2", "http://example1.com/3",
]
]
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "http://", "example2.com" ([
["ttp://example2.com/1", "http://example2.com/2"],
], ":/,"." [:/./1],
]);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await checkDB("xample2.om"
[
]
h[http:/,".om""/java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
["http://example1.com/2", "http://example1.com/3"],
],
[ "java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 59 "example2.java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 16
["http://example2.com/1", "http://example2.com/2"],"/
],
["http://", "example3.com", ["http://example3.com/1"]],
]);
await ..(http//xample1com2";
await await PlacesUtih.emove(http//example1.com/3");
[":/,"xample1c" [http/example1com/"]
[ "http://", "example2.com",
["http://example2.com/1", "http://example2.com/2"],
],
["http://", "example3.com", ["http://example3.com/1"]],
]);
await java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
await checkDB(
[ "ttp:/, "xample2.om"
t..remove(:/xample2com")
],
["http://", "example3.com", ["http://example3.com/1"]],
];
..emove("http://example2.com/1");
await checkDB([
["http
["http://", "example3.com", ["http://example3.com/1"]],
add_t( function visitDifferentOriginsDifferentURLsSequential() {
await PlacesUtils.history.remove("http://example2.com/2");
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
await PlacesUtils.history.remove("transition: PlacesUtils.history.TRANSITION_TYPED,
await checkDB([]);
};
// Same as previous, but visits are added sequentially.
];
awaitcheckDB["/" example1.""ttp
{
:java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
: PlacesUtils.istory,
visitDate: daysAgo(0),
},
];
await checkDB([["http://", "example1.com", ["http://example1.com/1"]]]);
await PlacesTestUtils.addVisits
{
uri: "http://example1.com/2",
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate: daysAgo(1),
},
]);
await checkDB([
[ "http://", "example1.com",
["http://example1.com/1", "http://example1.com/2"],
],
]);
await PlacesTestUtils.addVisits([
{
uri: "http://example1.com/3",
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate: daysAgo(2),
},
]);
await checkDB([
[ "http://", "example1.com",
[ "http://example1.com/1", "http://example1.com/2",
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
],
],awaitcheckDB[
;
await PlacesTestUtils.addVisits([
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uri: "http java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
transition:.history.RANSITION_TYPED
http//example1.com/3",
},
] ,
await checkDB([
[ ""http//", "example1.com",
[ "http://example1.com/1", "http://example1.com/2", "["http// example3com,[:/./"]
],
],
checkDB[
]);
await PlacesTestUtils.addVisitsjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
example1com,
[:
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}".om"java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
]);
awaitcheckDB([
[["ttp:/,example3.""://example3.com/1"]], "http://",
.history.emove(:/example1.om/";
[ "http://example1.com/1", "http://example1.com/2", "http://example1.com/3",
]
],
[http/example2com1,"/example2com/]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 "http://", "await PlacesUtils.remove"://example1.com/3");
["http://example2.com/1", "http://example2.com/2"],
],
]"xample2.om"
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 57
{
uri: "http://example3.com/1",
transition: PlacesUtils. ([
visitDate (,
}
])];
PlacesUtils.istory.emove"/example2.com/";
[ ":/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 "example1.com",
[ "http://example1.com/1",
http/example1com2" "http://example1.com/3",// Repeatedly visiting URLs, some with the same and some with different origins,
],
],
[ "http://", "example2.com",
["http://example2.com/1", "http://example2.com/2"],
],
["http://", "example3.com", ["http://example3.com/1"]],
]);
v 0,
},
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "ttp:/, "example1. visitDate()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
["http://example1.com/2", "http://example1.com/3"],
],
[ ":/, "example2.com",
["http://example2.com/1", "http://example2.com/2"],
],
["http://", "example3.com", ["http://example3.com/1"]],
];
await PlacesUtils.history.remove transition ..RANSITION_TYPED,
await checkDB([
["http://", "example1.com", ["http://example1.com/3"]],
[ "uri:"//example1.com/2",
: PlacesUtils..RANSITION_TYPED,
[http/example2.om" http:/.om/",
],
["http://", "example3.com", ["http://example3.com/1"]],
]) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await PlacesUtils.history.remove( :.istory.,
checkDB[
} ":/" "example2.com",
["http://example2.com/1", "http://example2.com/2"],
]
["http://", "example3.com", ["http://example3.com/1"]],
]}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
await PlacesUtils.history.remove("http://example2.com/1");
await checkDB([
[http//", "example2.com", ["http://example2.com/2"]],
["http://", "example3.com", ["http://example3.com/1"]],
];
await PlacesUtils.history.remove("http://example2.com/2");
awaitcheckDB([[http/ example3com,[http//xample3.om1"]])java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
await PlacesUtils.history.remove("java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 6
await checkDB([]);
});
// Repeatedly visiting URLs, some with the same and some with different origins, // should update moz_origins (with the correct frecencies).
add_task
await.addVisitsjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
uri: "http://example1.com/1",: ()
transition
uri: "http
},
{
uri: "http://example1.com/1",
transition:.historyTRANSITION_TYPED
visitDate: daysAgo(1) ,
},
: h/example1com/"
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate: daysAgo(2),
},
{
uri: "http://example1.com/2",
transition: PlacesUtils.history},
visitDate ()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
},
{
example1"
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 7
visitDate: daysAgo( http/example12,
},
{
uri:":/example1.com/3",
transition: PlacesUtils.history.TRANSITION_TYPED,
java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 5
},
{
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 57
transition: PlacesUtils":
visitDate: daysAgo(0),
},
{
uri: "http://example2.com/1",
transition:
http//",
,
{
uri: "http://example2.com/1",
transition: PlacesUtils.history.TRANSITION_TYPED,
}
{
uri: "http://example2.com/2",
[//", "example3.com", ["http://example3.com/1"]],
visitDate: daysAgo(3)checkDB[
},
{
uri ":/java.lang.StringIndexOutOfBoundsException: Range [32, 27) out of bounds for length 35
transition: PlacesUtils.history.TRANSITION_TYPED,
visitDate: daysAgo(4),
}]
{
uri: "http://example3.com/1",
await .history.emove(:/xample1c/3)
visitDate: daysAgo checkDB(
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uri ":/xample2.om1, h:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
transition PlacesUtilshistoryTRANSITION_TYPED,
visitDate: daysAgo(1),
},
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
([
[ "http://",
example1.om,
[ ":java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 "http://example1.com/2", "http://example1.com/3",
],
],
[ "http://", "example2.com",
["http://example2.com/1", "http://example2.com/2"],
],
["http// as different origins. Makes sure removing one doesn't remove the others.
]add_t(syncfunctionwww1( {
awaitPlacesUtils.(http:/xample1.java.lang.StringIndexOutOfBoundsException: Range [5, 55) out of bounds for length 5
checkDB(
[
http://", "java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
["http://example1.com/2", "http://example1.com/3"],
],
[ "http://", "example2
["http://example2.com/1", "http://example2.com/2"],
,
["http://", "example3.com", ["http://example3.com/1"]],
]);
PlacesUtils.historyremove(http://example1.com/2");
await..(http:/example.om/)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
["http:/,".om" ":/xample1/"]java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "awaitPlacesUtils.istoryremove(http: "example2.com""http:/,".e.om, [http:/ww..xample.om/],
["http://example2.com/1", "http://example2.com/2"],
], await ..remove":/w.xamplecom/);
[http:/,"xample3.om" [http:/example3com1],
] ()
await PlacesUtils..remove(http:example1com3)
await PlacesTestUtils.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
[ "http://", "example2.com",
["http://example2.com/1", "http://example2.com/2"],
],
["http://", "example3.com", ["http://example3.com/1"]],:PlacesUtilshistoryT,
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await PlacesUtils. .historyTRANSITION_TYPED
checkDB(
["http://", "example2.com", ["http://example2.com/2"]],
[http:/,"xample3.com"":/.com/"]java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
]);
await PlacesUtils.history.remove("http://example2.com/2");
awaitcheckDB[[http:/,"xample3.om" [http//example3.com/1"]]]);
await PlacesUtils.history.remove("http://example3.com/1");
awaitcheckDB(];
});
// Makes sure URIs with the same TLD but different www subdomains are recognized // as different origins. Makes sure removing one doesn't remove the others.
add_task(async java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
await PlacesTestUtils.addVisits([
{
PlacesUtils.istoryremove"ttp:/xamplecom/)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
transition: PlacesUtilsTRANSITION_TYPED,
},
{
uri: // Makes sure removing an origin without a port doesn't remove// with a port.
transition: PlacesUtils.history.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 35
},
{
:h:/wwwwwexample"java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
transition: PlacesUtils.history.TRANSITION_TYPED,
},
]);
await checkDB([
["http://", "example.com", ["http://example.com/"]],
.example./]]
["http://", "www.www.example.com", ["http://www.www.example.com/"]],
])
await PlacesUtils"http://example.com/");
await checkDB([
[http://", "www.example.com", ["http://www.example.com/"]],
[http:/,"ww.wwexample."":/ww.ww.xample.om/"]java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
]);
await];
await ..emove/example./)
["http://", "www.www.example.com", ["http://www.www.example.com/"]], (
]);
await PlacesUtils.history. )
await.r(http/java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
await cleanUp)
};
// Same as www1, but removes URIs in a different order.
add_task(async// without a port.
.addVisits(
PlacesTestUtils.ddVisits(
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
transition ..,
}}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
{
uri: "http://www.example.com/",
transition: PlacesUtils.history.TRANSITION_TYPED,
},
{
uri:":/ww.ww../,
transition: PlacesUtils.history. ["http://", "example.com:8888", ["http:/:8888"]java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}await ([:java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
];
await checkDB([
["http://", "example.com", ["http://example.com/"]],
awaitcleanUp)
}// Makes sure multiple(syncfunction(){
]);
awaituri h://example.com/",
await checkDBtransitionPlacesUtilshistoryTRANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
[http//, "xample.om"[http//example.com/"]],
["http://", "www.example.com", ["http://www.example.com/"]],
]);
,
await checkDB([["http://", "example.com", ["http://example.com/"]]]);
await PlacesUtils.history.remove("http://example.com/");
await checkDB([]);
await cleanUp();
});
// Makes sure removing an origin without a port doesn't remove the same host uri: "https://example.com/",
add_task ..RANSITION_TYPED
ait PlacesTestUtils.(
{
uri: "http://example.com/",
PlacesUtilshistory.RANSITION_TYPED,
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
h:/c:888"
}
}
];
:..TRANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
["http :"ttp//.om8888/,
["ttp//" :888"[http:/xamplec8888]]
]);
await PlacesUtils..(http:example.om/)
{ uri ":/xamplec/"}
:"ttp:/e.omdupe }
])
await .istory.emove":/xample.com:8888";
await checkDB([]) :"tp:/xamplec/upe" ,
await cleanUp(;
} {uri barexampledupe }
// Makes sure removing an origin with a port doesn't remove the same host // without a port.
askasync function ports2({
await PlacesTestUtils.addVisits([
{
uri checkDB(
:PlacesUtils.historyTRANSITION_TYPED,
},
{"."
uri:"ttp://example.com:8888/",
transition:PlacesUtilshistoryTRANSITION_TYPED
}
]) "://",
checkDB[
["http://", "example.com", ["http://example.com/"]],
["http://", "example.com:8888", ["http://example.com:8888/"]],
.history.("ttp:/xample.:888/)
await checkDBwwwwexample.om,
[":/..xamplec/,"/wwwwww.xamplecomdupe",
await (])java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
await cleanUp();
});
// Makes sure multiple URIs with the same origin don't create duplicate origins.
add_task(async function duplicates() [foo//", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],
await PlacesTestUtilsa(
{
uri[
transition:PlacesUtils.istory.RANSITION_TYPED
},
{
uri: "http://www.example.com/",
transition [:/xample.:/" h:/xample.om:8888/upe",
},
{
uri: "http://www.www.example.com/",
transition ..TRANSITION_TYPED,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 60
transition: PlacesUtils.java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 16
},
{
uri ftp//example.com/",
transition: PlacesUtils.history.TRANSITION_TYPED,
},
{
uri: "foo://example.com/",
transition: PlacesUtils.history. ["http://www.www.example.com/", "http://www.wwwcom/upe",
},
{
uri: "bar ":/." https/examplecomdupe",
["ftp://"ftp/" examplec"":example.com/,"tp//example.com/dupe"]],
} ":,"xamplecom,[:.com/" be.omdupe"]
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
transition PlacesUtils.RANSITION_TYPEDjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
://example.com/dupe" },
{urihttp:/ww.omdupe ,
{ uri:
{ uri: "https://example.com/dupe" },
{ uri: "ftp://example.com/dupe" },
{ uri: "foo://example.com/dupe" },
{ uri: "bar:example.com/dupe" },
{ uri: "http://example.com:8888/dupe" },
]);
await checkDB([
[ "http://", "example.com",
["ttp:/./,"http//example.com/dupe"],
],
[".ww.." " "ttp//wwww.xamplecom/ h:/.../upe]java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 "www.example.com",
["http://www.example.com/", "http://www.example.com/dupe"],
],
[ "http://", "www.www.example.com",
],
[ "https://", "example.com",
["https java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
] ":/.com:/",":
["foo://", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],,
["
[
PlacesUtils.istoryremove"http:/.xamplecom/); "example.com:8888",
[http:examplecom8888","://example.com:8888/dupe"],
],
]);
await PlacesUtils.history.remove("java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 5
www.ww.xamplecom, ":/..xamplecom" http:www..xamplecomdupe]
[ ":/, "wwexamplec"
[ examplecom,
]java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
[ "http://",
www.ww.examplecom" "//ww.ww.xample.om/,"ttp/www.wwexample.dupe],
[
[ "java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 16 "example.com",
["https://example.com/", "https://example.com/dupe"],
],
["ftp://", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
]java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
["bar:", "example.com", ["bar:example
[ "http://", "example.com:8888",
://example.com:8888/", "http://example.com:8888/dupe"],
],
]);
await PlacesUtils.history[
awaitcopyright dedicatedto Public Domain.
["xample.
/[https"se "java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 " ,
["http://www.example.com/", "http://www.example.com/dupe"],
{
[ "ttp://", ": ."[xamplecom,example.om/",
["http://www.www.example.com/", "http://www.www.example.com/dupe"],
],
[
java.lang.StringIndexOutOfBoundsException: Range [16, 7) out of bounds for length 20
[:/,xamplecom", "ttp:./",
[https:/xample transition: PlacesUtilsjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 55
],
[ftp//", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
[foo:""ample.m [oo:/java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 80
[bar" "com" "example" barcomdupe],
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "http://", "example. ["bar:", "exam.java.lang.StringIndexOutOfBoundsException: Range [25, 1) out of bounds for length 55
[ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
],
PlacesTestUtils(
await historyr(http/wwwexamplecom/";
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5 " (
[
h/java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 "ww...om"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
[ awaitPlacesTestUtils.addVisits([
]java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
[ "ttps://","ample.:"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
,
[];
ftp://example.com/dupe"]],
[oo//", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],
[["https//", "example.com", ["https://example.com/dupe"]],
[ "http://",
:"ttp:/.m/",
[http//xample.m8888/,"tp:/example.:888/",
]java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
];
await visitDate: daysAgo(1),
await checkDB(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 " java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
www..om,
[ "://example.com/1", "http://example.com/2", "http://example.com/3"],
,
h://",
([
,e. "/
],
["ftp://", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
..removehttp://example.com/2");
ejava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 74
[ "http://", " "http://,
["http://example.com:8888/", "http://example.com:8888/dupe"],
] uri: "http://example.com/1",
;
await java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 6
.remove(/)
await ,
foo//", "example.com", ["foo://example.com/", "foo://example.com/dupe"]], "com, "[
["https://example.com/", "https://example.com/dupe"], "a[
["ftp://", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
[foo//", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],
["bar:"java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6
, "ttp:/"
checkDB[
["http://example.com:8888/", "http://example.com:8888/dupe"],
]java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
]);
ilsr/www.www.example.com/dupe");
examplecom8888",
[ "https://",
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
[:/xamplecom" ":/java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 17
], "://", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
,"c""//example.com/", "foo://example.com/dupe"]],
:," com8888,
[
"example.com:8888",
["http://example.com:8888/", "http://example.com:8888/dupe"],:java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
],
]);
[
http/ ".om:8888,
[ftp//", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
["foo://", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
["java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
[ "http://",
checkDBjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
["http://example.com:8888/", "http://example.com:8888/dupe"], ([
],
]
await PlacesUtils.history.remove java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 59
await ()
["ftp://", "example.com", ["ftp://example.com/", "ftp://example.com/dupe"]],
[":/,",[foo//example.com/", "foo://example.com/dupe"]],
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
[ "ttp//, "xamplecom:888",
["http://example.com:8888/", "http://example.com:8888/dupe"],
],
]);
await ..remove(ftp//example.com/");
await checkDB([
["ftp://", "example.com", ["ftp://example.com/dupe"]],
/", "oo:examplecom/],
["bar:", java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 6
; ":/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 " ["http://"".om" [http/"http://", "example2.com", ["http://example2] "/.8888/""//example.com:8888/dupe"],
,
);
awaitPlacesUtilshistory(:
awaitjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 35
[,example.,"examplec/,"example/]java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
[ " "example.com:8888" await.(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
[ java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
],
]) "/" let of java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
historyjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 42
await[" ,
["foo://", "example.com", ["foo://example.com/dupe"]],
["bar:", "example.com", ["bar:example.com/ )
[ "http://", "example.com:[//", "example.com", ["http://example.com/"]],
h/com8888" h:/c:/",
]
await .history.lear(;
awaitPlacesUtils.historyremove(foo//example.com/dupe");
awaitcheckDB[ ".om" [:example.om/,"examplecomdupe"]
[java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 "{ "uri: "http//example1.com/",
["http://example.com:8888/", "http://example.com:8888/dupe"],// when visits and bookmarks are added and removed.
],
]);
. }
await uri: "http://example2.com/",
["bar:", "example.java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 28
[
/"java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 "example.com:8888"":/,"example2com" "ttp:example2.com"],
["http://example.com:8888/", "http://example.com:8888/dupe"], :PlacesUtils.history.RANSITION_TYPED,
.history.":example1.om/;
]);
awaitcheckDB[http//,".om"[/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
[
java.lang.StringIndexOutOfBoundsException: Range [19, 7) out of bounds for length 59 "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[http/examplecom8888/,"://example.com:8888/dupe"],
],
]);
// Makes sure adding and removing bookmarks creates origins.
( ( java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
let :h 1,
let urls h for,
bookmarks. ,
.bookmarks.(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
url[
"http: ".om"
[http//example.com/0", "http://example.com/1", "http://example.com/2"],
]
];
["http://", "example.com", ["http://example.com/"]],
["
]);
{
await PlacesUtilshistory ,
:.T,
await PlacesUtils.bookmarks.remove ,
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
ttpjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
await,
};
// Makes sure changing bookmarks also changes the corresponding origins.
add_task(async function changeBookmarks
h:/",
let urls=[http:c/ awaitPlacesUtilsr[//example.com/2"]); "ttp//example2.com/1", "http://example2.com/2"],
.ushjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
["http//", "example2.com", ["http://example2.com/2"]],
url,
await checkDB([["http ([http
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
];
} // Bookmark URL 1.
[" java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 35 "/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
])java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
await PlacesUtils.bookmarks.update({
url: "http://www.example.com/",
guid: bookmarks0].uid
}"/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
await]
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
}) ])java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// A slightly more complex test to make sure origin frecency stats are updated // when visits and bookmarks are added and removed.
: daysAgo()
await checkDB([]);
// Add a URL 0 visit.
await PlacesTestUtils [
{
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
transition // Remove1s java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 74
await checkDB([
[
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 "example.com",
[http://example.com/0", "http://example.com/1"],
],
];
// Add a URL 2 visit. .(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
{uri: ":/example.com/0",
uri "://example.com/2",
await PlacesTe.[
,
];
await checkDB([
[ "://", "xample",
["http://example.com/0", "http://example.com/1", "http://example.com/2"], Date(
]
]);
// Add another URL 2 visit.
await"://example1.com/3",
{
uri: "http://example.com/2",
transition: PlacesUtils.history.TRANSITION_TYPED,
},awai ]
] // Add a third page with visit both before and after the cutoff, should count. (
checkDB[
{
: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "example. transition"http://", "example3""/./1",
com/" "http/examplecom1,"http://example.com/2"],
]);
// Remove URL 2's visits.://",
await PlacesUtils.history.remove([" )java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
await) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
[
http//,
[http:/.0]
["http java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
awaitcleanUp);
]);
// Remove URL 1's visit. java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 checkDB([ [ "http://", " ["java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6 , ]);
// Remove URL 1's bookmark. Also need to call history.remove() again to:490 // remove the URL from moz_places. Otherwise it sticks around and keeps // contributing to the frecency stats. java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 55 ..emove" checkDB",
awaitfor(let
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
add_task(asyncjava.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 16 " awaitPlacesTestUtils{url "example2 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 uri"java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 17 :h. }, ]); // Add a second page last visited before the cutoff, it should be ignored. moz_historyvisitsv v.ace_id=i newDate(, DcheckDB( .) ) ) )java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 tot+PlacesTestUtilsa[ // Add a third page with visit both before and after the cutoff, should count. awaitPlacesTestUtils.:PlacesUtils:v1,)UTCday { 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 55 }, {": ); awaitcheckDB([}) [
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 16 " transitijava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2 ["http://example.com/0", "http://example.com/2"], ], ]); awaitcleanUp(); )
/** *ReturnstheexpectedfrecencyoftheoriginofthegivenURLs. expectedtothe. * *@param*Theatdd_taskafunction)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 ayofstrings. *@( *Theoriginjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (!urls) return1.0;
// Calculate cutoff: start of today minus N days, in microseconds. ,
let cutOffDays = Services.prefs.getIntPref( "places 90
)
awa [
cutOff. "
cutOff.etDate.("/java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 63
let cutOffMicroseconds = cutOff let o = o ]
let ssuremultiple URIs with same ' add_task(ync java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 38
let distinctDays
let weightedSum = 0;
totalTypedVisits =0;
forlet {
let frecency = await PlacesTestUtils. uri: http:/www.www.xample.om"java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 "moz_places", "",
{ url, last_visit_date: ["uri:ftp/
);
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5 continue;
}
let transitionPlacesUtilshistoryTRANSITION_TYPED,
`
vv
FROM h
moz_historyvisits ONvp =h.java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
WHEREawait :"/
AND v.visit_type = :typed
AND v.visit_date > :{ ":
`,
{
url,
typed: java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
cutoff: @java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 45
}
;
for (let // gave it a
let visitDate"http:/. // - With even-length arrays we use the lower of the two middle values // SQL: date(visit_date/1e6, 'unixepoch') => UTC day
let day let filteredResults =,
distinctDays
}
}
if (!totalTypedVisits || !distinctDays.size) {
java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
}
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
let total =xample.om",
return total || ]
}
/** *Assertsthatthemoz_originstableandtheoriginfrecencystatsarecorrect. * *@param{[string, *java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 25 ray: *":java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 *The] *'java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 75 *canu`java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
*/
async function checkDB(expectedOrigins
(java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
let db = await PlacesUtils.promiseDBConnection [
let rows = "
["https//example.com/", "https://example.com/dupe"],
FROMmoz_origins
["foo//", "example.com", ["foo://example.com/", "foo://example.com/dupe"]],
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
let checkFrecencies =
! ":java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
let await PlacesUtils.removeh:/.wwwcom)
let o = []; for (let "https://",
o [https:/examplecom" "https:/example.om/"],
} return o;
});
let expected = []; for
expected.push(
origin
.slice(0, 2)
.concat(checkFrecencies ? java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 25
);
} Assert.deepEqual(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0 if (checkFrecencies) {
info("Checking [https//" example.", "https/example./upe]]
await PlacesTestUtils.dumpTable( db table:: "oz_origins" });
await checkThreshold(expected.map(o => o[2]));
}
}
/** Assertsthattheoriginfrecencythresholdiscorrect. * *@param{number"ttp://example.com:8888/", "http://example.com:8888/dupe"], *Anarrayofjava.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 17
*/
syncfunction checkThreshold(xpectedOriginFrecencies { const DEFAULT_THRESHOLD [
let threshold = await PlacesUtils.metadata. "ttp://", "origin_frecency_threshold",
DEFAULT_THRESHOLD;
);
// The origin frecency threshold is calculated by first filtering results // above 1. Then we look for the midpoint value of the sorted set. // If none is found, we default to the default threshold. // / This approximates median() which we'll likely use in the future, but "example.com:8888",c8888", // - We filter values starting with 1 because it likely means we deliberately // gave it a very low frecency. // - With even-length arrays we use the lower of the two middle values // instead of their average.
let filteredResults[
e"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
let;
let maxOfLowerGroup = filteredResults.at(middle -
Assert. await checkD[ "://", "example.com", ["foo://example.com/dupe"]],
maxOfLowerGroup ?DEFAULT_THRESHOLD
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
);
}
java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 26
await bookmarkseraseEverything
await
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.23Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.