mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 23:12:21 +00:00
backing out, tree is closed
This commit is contained in:
parent
4026e710af
commit
c2f963e3ae
@ -3184,7 +3184,9 @@ PlacesSQLQueryBuilder::SelectAsSite()
|
||||
history->GetStringFromName(NS_LITERAL_STRING("localhost").get(), localFiles);
|
||||
mAddParams.Put(NS_LITERAL_CSTRING(":localhost"), localFiles);
|
||||
|
||||
// We want just sites, but from whole database.
|
||||
// We want just sites, but from whole database - we omit join with visits,
|
||||
// it could happen, that we get later empty host, when we click on it, but
|
||||
// this should be much faster.
|
||||
if (mConditions.IsEmpty()) {
|
||||
|
||||
mQueryString = nsPrintfCString(2048,
|
||||
@ -3194,7 +3196,6 @@ PlacesSQLQueryBuilder::SelectAsSite()
|
||||
"WHERE EXISTS(SELECT '*' "
|
||||
"FROM moz_places "
|
||||
"WHERE hidden <> 1 AND rev_host = '.' "
|
||||
"AND visit_count > 0 "
|
||||
"AND url BETWEEN 'file://' AND 'file:/~') "
|
||||
"UNION ALL "
|
||||
"SELECT DISTINCT null, "
|
||||
@ -3203,8 +3204,7 @@ PlacesSQLQueryBuilder::SelectAsSite()
|
||||
"FROM (SELECT get_unreversed_host(rev_host) host "
|
||||
"FROM (SELECT DISTINCT rev_host "
|
||||
"FROM moz_places "
|
||||
"WHERE hidden <> 1 AND rev_host <> '.' "
|
||||
"AND visit_count > 0 ) inner0 "
|
||||
"WHERE hidden <> 1 AND rev_host <> '.') inner0 "
|
||||
"ORDER BY 1 ASC) inner1",
|
||||
nsINavHistoryQueryOptions::RESULTS_AS_URI,
|
||||
nsINavHistoryQueryOptions::SORT_BY_TITLE_ASCENDING,
|
||||
@ -3222,7 +3222,6 @@ PlacesSQLQueryBuilder::SelectAsSite()
|
||||
"FROM moz_places h "
|
||||
"JOIN moz_historyvisits v ON h.id = v.place_id "
|
||||
"WHERE h.hidden <> 1 AND h.rev_host = '.' "
|
||||
"AND h.visit_count > 0 "
|
||||
"AND h.url BETWEEN 'file://' AND 'file:/~' "
|
||||
"AND v.visit_type NOT IN (0,4) {ADDITIONAL_CONDITIONS} ) "
|
||||
"UNION ALL "
|
||||
@ -3235,7 +3234,6 @@ PlacesSQLQueryBuilder::SelectAsSite()
|
||||
"FROM moz_places h "
|
||||
"JOIN moz_historyvisits v ON h.id = v.place_id "
|
||||
"WHERE h.hidden <> 1 AND h.rev_host <> '.' "
|
||||
"AND h.visit_count > 0 "
|
||||
"AND v.visit_type NOT IN (0,4) "
|
||||
"{ADDITIONAL_CONDITIONS} ) inner0 "
|
||||
"ORDER BY 1 ASC) inner1",
|
||||
|
@ -206,12 +206,6 @@ function test_RESULTS_AS_DATE_QUERY() {
|
||||
|
||||
function test_RESULTS_AS_SITE_QUERY() {
|
||||
|
||||
// add a bookmark with a domain not in the set of visits in the db
|
||||
var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
||||
getService(Ci.nsINavBookmarksService);
|
||||
bmsvc.insertBookmark(bmsvc.toolbarFolder, uri("http://foobar"),
|
||||
bmsvc.DEFAULT_INDEX, "");
|
||||
|
||||
var options = histsvc.getNewQueryOptions();
|
||||
options.resultType = options.RESULTS_AS_SITE_QUERY;
|
||||
var query = histsvc.getNewQuery();
|
||||
@ -220,7 +214,7 @@ function test_RESULTS_AS_SITE_QUERY() {
|
||||
root.containerOpen = true;
|
||||
do_check_eq(root.childCount, dayLabels.length*2);
|
||||
|
||||
// We include this here, so that maintainer knows what is the expected result
|
||||
// We include this here, se that maintainer knows what is the expected result
|
||||
var expectedResult =
|
||||
[
|
||||
"mirror0.google.com",
|
||||
|
Loading…
x
Reference in New Issue
Block a user