Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: browser/components/urlbar/tests/unit/xpcshell.toml
/* 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,
add_setup(async function () {
registerCleanupFunction(async () => {
Services.prefs.clearUserPref("browser.urlbar.suggest.searches");
Services.prefs.clearUserPref("browser.urlbar.suggest.quickactions");
});
Services.prefs.setBoolPref("browser.urlbar.suggest.searches", false);
Services.prefs.setBoolPref("browser.urlbar.suggest.quickactions", false);
});
add_task(async function test_untrimmed_secure_www() {
await PlacesTestUtils.addVisits({
});
let context = createContext("mo", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
makeVisitResult(context, {
}),
],
});
await cleanupPlaces();
});
add_task(async function test_untrimmed_secure_www_path() {
await PlacesTestUtils.addVisits({
});
let context = createContext("mozilla.org/t", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/test/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
],
});
await cleanupPlaces();
});
add_task(async function test_untrimmed_secure() {
info("Searching for untrimmed https:// entry");
await PlacesTestUtils.addVisits({
});
let context = createContext("mo", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
makeVisitResult(context, {
}),
],
});
await cleanupPlaces();
});
add_task(async function test_untrimmed_secure_path() {
info("Searching for untrimmed https:// entry with path");
await PlacesTestUtils.addVisits({
});
let context = createContext("mozilla.org/t", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/test/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
],
});
await cleanupPlaces();
});
add_task(async function test_untrimmed_www() {
await PlacesTestUtils.addVisits({
});
let context = createContext("mo", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
makeVisitResult(context, {
}),
],
});
await cleanupPlaces();
});
add_task(async function test_untrimmed_www_path() {
await PlacesTestUtils.addVisits({
});
let context = createContext("mozilla.org/t", { isPrivate: false });
await check_results({
context,
autofilled: "mozilla.org/test/",
matches: [
makeVisitResult(context, {
heuristic: true,
}),
],
});
await cleanupPlaces();
});
add_task(async function test_escaped_chars() {
info("Searching for URL with characters that are normally escaped");
await PlacesTestUtils.addVisits({
});
isPrivate: false,
});
await check_results({
context,
matches: [
makeVisitResult(context, {
source: UrlbarUtils.RESULT_SOURCE.HISTORY,
heuristic: true,
}),
],
});
await cleanupPlaces();
});