# HG changeset patch # User ayus # Date 1513353691 -19800 # Node ID 21bc5f64c3395c40fd9d065c398b5d63a22b8f45 # Parent 5c31169f8e281504200d3f372a5be70d3e281f12 Bug 1421212 - Remove RESULTS_AS_FULL_VISIT. r=mak diff --git a/toolkit/components/places/nsINavHistoryService.idl b/toolkit/components/places/nsINavHistoryService.idl --- a/toolkit/components/places/nsINavHistoryService.idl +++ b/toolkit/components/places/nsINavHistoryService.idl @@ -1032,27 +1032,16 @@ interface nsINavHistoryQueryOptions : ns * often give you multiple results for one URI). Individual result nodes will * have type "Visit" * * @note This result type is only supported by QUERY_TYPE_HISTORY. */ const unsigned short RESULTS_AS_VISIT = 1; /** - * This is identical to RESULT_TYPE_VISIT except that individual result nodes - * will have type "FullVisit". This is used for the attributes that are not - * commonly accessed to save space in the common case (the lists can be very - * long). - * - * @note Not yet implemented. See bug 409662. - * @note This result type is only supported by QUERY_TYPE_HISTORY. - */ - const unsigned short RESULTS_AS_FULL_VISIT = 2; - - /** * This returns query nodes for each predefined date range where we * had visits. The node contains information how to load its content: * - visits for the given date range will be loaded. * * @note This result type is only supported by QUERY_TYPE_HISTORY. */ const unsigned short RESULTS_AS_DATE_QUERY = 3; diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -1495,17 +1495,16 @@ PlacesSQLQueryBuilder::Select() { case nsINavHistoryQueryOptions::RESULTS_AS_URI: case nsINavHistoryQueryOptions::RESULTS_AS_TAG_CONTENTS: rv = SelectAsURI(); NS_ENSURE_SUCCESS(rv, rv); break; case nsINavHistoryQueryOptions::RESULTS_AS_VISIT: - case nsINavHistoryQueryOptions::RESULTS_AS_FULL_VISIT: rv = SelectAsVisit(); NS_ENSURE_SUCCESS(rv, rv); break; case nsINavHistoryQueryOptions::RESULTS_AS_DATE_QUERY: case nsINavHistoryQueryOptions::RESULTS_AS_DATE_SITE_QUERY: rv = SelectAsDay(); NS_ENSURE_SUCCESS(rv, rv); @@ -4001,17 +4000,16 @@ nsNavHistory::VisitIdToResultNode(int64_ nsAutoCString tagsFragment; GetTagsSqlFragment(GetTagsFolder(), NS_LITERAL_CSTRING("h.id"), true, tagsFragment); nsCOMPtr statement; switch (aOptions->ResultType()) { case nsNavHistoryQueryOptions::RESULTS_AS_VISIT: - case nsNavHistoryQueryOptions::RESULTS_AS_FULL_VISIT: // visit query - want exact visit time // Should match kGetInfoIndex_* (see GetQueryResults) statement = mDB->GetStatement(NS_LITERAL_CSTRING( "SELECT h.id, h.url, h.title, h.rev_host, h.visit_count, " "v.visit_date, null, null, null, null, null, " ) + tagsFragment + NS_LITERAL_CSTRING(", h.frecency, h.hidden, h.guid, " "v.id, v.from_visit, v.visit_type " "FROM moz_places h " diff --git a/toolkit/components/places/tests/queries/test_querySerialization.js b/toolkit/components/places/tests/queries/test_querySerialization.js --- a/toolkit/components/places/tests/queries/test_querySerialization.js +++ b/toolkit/components/places/tests/queries/test_querySerialization.js @@ -376,19 +376,16 @@ const queryOptionSwitches = [ // property is used by function simplePropertyMatches. property: "resultType", desc: "nsINavHistoryQueryOptions.resultType", matches: simplePropertyMatches, runs: [ function(aQuery, aQueryOptions) { aQueryOptions.resultType = aQueryOptions.RESULTS_AS_URI; }, - function(aQuery, aQueryOptions) { - aQueryOptions.resultType = aQueryOptions.RESULTS_AS_FULL_VISIT; - } ] }, // excludeItems { property: "excludeItems", desc: "nsINavHistoryQueryOptions.excludeItems", matches: simplePropertyMatches, runs: [ diff --git a/toolkit/components/places/tests/unit/test_history.js b/toolkit/components/places/tests/unit/test_history.js --- a/toolkit/components/places/tests/unit/test_history.js +++ b/toolkit/components/places/tests/unit/test_history.js @@ -39,31 +39,27 @@ add_task(async function test_execute() { var testURI = uri("http://mozilla.com"); await PlacesTestUtils.addVisits(testURI); // now query for the visit, setting sorting and limit such that // we should retrieve only the visit we just added var options = histsvc.getNewQueryOptions(); options.sortingMode = options.SORT_BY_DATE_DESCENDING; options.maxResults = 1; - // TODO: using full visit crashes in xpcshell test - // options.resultType = options.RESULTS_AS_FULL_VISIT; options.resultType = options.RESULTS_AS_VISIT; var query = histsvc.getNewQuery(); var result = histsvc.executeQuery(query, options); var root = result.root; root.containerOpen = true; var cc = root.childCount; for (var i = 0; i < cc; ++i) { var node = root.getChild(i); // test node properties in RESULTS_AS_VISIT Assert.equal(node.uri, testURI.spec); Assert.equal(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI); - // TODO: change query type to RESULTS_AS_FULL_VISIT and test this - // Assert.equal(node.transitionType, histsvc.TRANSITION_TYPED); } root.containerOpen = false; // add another visit for the same URI, and a third visit for a different URI var testURI2 = uri("http://google.com/"); await PlacesTestUtils.addVisits(testURI); await PlacesTestUtils.addVisits(testURI2);