зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 578e4005a84b (bug 1588118) for Browser-chrome failures in docshell/test/browser/browser_uriFixupIntegration.js. CLOSED TREE
This commit is contained in:
Родитель
cf3d2dccbb
Коммит
c50e4ba81d
|
@ -262,7 +262,7 @@ nsDefaultURIFixup::GetFixupURIInfo(const nsACString& aStringURI,
|
|||
|
||||
if (info->mFixedURI && ourHandler == extHandler &&
|
||||
StaticPrefs::keyword_enabled() &&
|
||||
(aFixupFlags & FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP)) {
|
||||
(aFixupFlags & FIXUP_FLAG_FIX_SCHEME_TYPOS)) {
|
||||
nsCOMPtr<nsIExternalProtocolService> extProtService =
|
||||
do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID);
|
||||
if (extProtService) {
|
||||
|
|
|
@ -55,23 +55,6 @@ var data = [
|
|||
|
||||
var len = data.length;
|
||||
|
||||
add_task(async function setup() {
|
||||
// Simulate a search engine being available. This shouldn't change results.
|
||||
Services.prefs.setBoolPref("keyword.enabled", true);
|
||||
// Shut up warnings about the geoip URL being malformed
|
||||
Services.prefs.setCharPref("browser.search.geoip.url", "http://localhost/");
|
||||
|
||||
const kSearchEngineID = "test_urifixup_search_engine";
|
||||
const kSearchEngineURL = "http://localhost/?search={searchTerms}";
|
||||
let engine = await Services.search.addEngineWithDetails(kSearchEngineID, {
|
||||
name: "Foo",
|
||||
method: "get",
|
||||
template: kSearchEngineURL,
|
||||
});
|
||||
|
||||
await Services.search.setDefault(engine);
|
||||
});
|
||||
|
||||
// Make sure we fix what needs fixing when there is no pref set.
|
||||
add_task(function test_unset_pref_fixes_typos() {
|
||||
Services.prefs.clearUserPref(pref);
|
||||
|
|
|
@ -28,6 +28,9 @@ var flagInputs = [
|
|||
Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT,
|
||||
Services.uriFixup.FIXUP_FLAGS_MAKE_ALTERNATE_URI,
|
||||
Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS,
|
||||
// This should not really generate a search, but it does, see Bug 1588118.
|
||||
Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS |
|
||||
Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT,
|
||||
];
|
||||
|
||||
/*
|
||||
|
|
|
@ -174,9 +174,7 @@ add_task(async function setup() {
|
|||
add_task(function test_fix_unknown_schemes() {
|
||||
for (let i = 0; i < len; ++i) {
|
||||
let item = data[i];
|
||||
let flags =
|
||||
Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS |
|
||||
Services.uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP;
|
||||
let flags = Services.uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS;
|
||||
if (item.inPrivateBrowsing) {
|
||||
flags |= Services.uriFixup.FIXUP_FLAG_PRIVATE_CONTEXT;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче