/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// "about:ab" should match "about:about"
add_task(async function aboutAb() {
let context = createContext("about:ab", { isPrivate: false });
await check_results({
context,
autofilled: "about:about",
completed: "about:about",
matches: [
makeVisitResult(context, {
uri: "about:about",
title: "about:about",
heuristic: true,
}),
],
});
});
// "about:Ab" should match "about:about"
add_task(async function aboutAb() {
let context = createContext("about:Ab", { isPrivate: false });
await check_results({
context,
autofilled: "about:About",
completed: "about:about",
matches: [
makeVisitResult(context, {
uri: "about:about",
title: "about:about",
heuristic: true,
}),
],
});
});
// "about:about" should match "about:about"
add_task(async function aboutAbout() {
let context = createContext("about:about", { isPrivate: false });
await check_results({
context,
autofilled: "about:about",
completed: "about:about",
matches: [
makeVisitResult(context, {
uri: "about:about",
title: "about:about",
heuristic: true,
}),
],
});
});
// "about:a" should complete to "about:about" and also match "about:addons"
add_task(async function aboutAboutAndAboutAddons() {
let context = createContext("about:a", { isPrivate: false });
await check_results({
context,
search: "about:a",
autofilled: "about:about",
completed: "about:about",
matches: [
makeVisitResult(context, {
uri: "about:about",
title: "about:about",
heuristic: true,
}),
makeVisitResult(context, {
source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL,
uri: "about:addons",
title: "about:addons",
iconUri: "page-icon:about:addons",
tags: null,
providerName: "AboutPages",
}),
],
});
});
// "about:" by itself matches a list of about: pages and nothing else
add_task(async function aboutColonMatchesOnlyAboutPages() { // We generate 9 about: page results because there are 10 results total, // and the first result is the heuristic result. function getFirst9AboutPages() { const aboutPageNames = AboutPagesUtils.visibleAboutUrls.slice(0, 9); const aboutPageResults = aboutPageNames.map(aboutPageName => { return makeVisitResult(context, {
source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL,
uri: aboutPageName,
title: aboutPageName,
iconUri: "page-icon:" + aboutPageName,
tags: null,
providerName: "AboutPages",
});
}); return aboutPageResults;
}
// Results for about: pages do not match webpage titles from the user's history
add_task(async function aboutResultsDoNotMatchTitlesInHistory() {
await PlacesTestUtils.addVisits([
{
uri: Services.io.newURI("http://example.com/guide/config/"),
title: "Guide to config in Firefox",
},
]);
// Tests that about: pages are shown after general results.
add_task(async function after_general() {
await PlacesTestUtils.addVisits([
{
uri: Services.io.newURI("http://example.com/guide/aboutaddons/"),
title: "Guide to about:addons in Firefox",
},
]);
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.