Bug 411293 - make the url bar drop down show typed sites ordered by frecency, not visit date. b-ff3=mconnor

This commit is contained in:
edward.lee@engineering.uiuc.edu 2008-02-28 08:04:59 -08:00
Родитель edd3ffd63c
Коммит ac5439a906
1 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -46,6 +46,10 @@
* the other.
*
* This also tests bug 395735 for the instrumentation feedback mechanism.
*
* Bug 411293 is tested to make sure the drop down strongly prefers previously
* typed pages that have been selected and are moved to the top with adaptive
* learning.
*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
@ -190,6 +194,32 @@ function prepTest(name) {
}
let tests = [
// Test things without a search term
function() {
prepTest("0 same count, diff rank, same term; no search");
setCountRank(uri1, c1, c1, s2);
setCountRank(uri2, c1, c2, s2);
ensure_results([uri1, uri2], s0);
},
function() {
prepTest("1 same count, diff rank, same term; no search");
setCountRank(uri1, c1, c2, s2);
setCountRank(uri2, c1, c1, s2);
ensure_results([uri2, uri1], s0);
},
function() {
prepTest("2 diff count, same rank, same term; no search");
setCountRank(uri1, c1, c1, s2);
setCountRank(uri2, c2, c1, s2);
ensure_results([uri1, uri2], s0);
},
function() {
prepTest("3 diff count, same rank, same term; no search");
setCountRank(uri1, c2, c1, s2);
setCountRank(uri2, c1, c1, s2);
ensure_results([uri2, uri1], s0);
},
// Test things with a search term (exact match one, partial other)
function() {
prepTest("4 same count, same rank, diff term; one exact/one partial search");