Bug 1408044 - stop using/overriding about: in Fennec and use about:fennec/firefox instead, r=nalexander

MozReview-Commit-ID: 3LQjMJZOuqc

--HG--
extra : rebase_source : 099f1e68d77ba4c575861873a155f2511ac6183f
This commit is contained in:
Gijs Kruitbosch 2017-11-14 23:41:37 +00:00
Родитель e29331e8a7
Коммит 53472dcba0
10 изменённых файлов: 20 добавлений и 42 удалений

Просмотреть файл

@ -11,7 +11,7 @@
<org.mozilla.gecko.preferences.LinkPreference android:key="android.not_a_preference.about.link"
android:title="@string/pref_about_firefox"
android:persistent="false"
url="about:" />
url="about:firefox" />
<org.mozilla.gecko.preferences.LinkPreference android:key="android.not_a_preference.faq.link"
android:title="@string/pref_vendor_faqs"

Просмотреть файл

@ -33,8 +33,8 @@ public class TestIconsHelper {
IconsHelper.guessDefaultFaviconURL("about:home"));
Assert.assertEquals(
"about:",
IconsHelper.guessDefaultFaviconURL("about:"));
"about:firefox",
IconsHelper.guessDefaultFaviconURL("about:firefox"));
Assert.assertEquals(
"about:addons",

Просмотреть файл

@ -26,7 +26,6 @@ public class AboutPages {
public static final String LOGINS = "about:logins";
public static final String PRIVATEBROWSING = "about:privatebrowsing";
public static final String READER = "about:reader";
public static final String UPDATER = "about:";
public static final String URL_FILTER = "about:%";
@ -83,8 +82,7 @@ public class AboutPages {
CONFIG,
DOWNLOADS,
FIREFOX,
HEALTHREPORT,
UPDATER
HEALTHREPORT
));
public static boolean isBuiltinIconPage(final String url) {

Просмотреть файл

@ -2136,7 +2136,7 @@ public class BrowserApp extends GeckoApp
*
* This depends on the current channel: Release and Beta both direct to
* the Google Play Store. If updating is enabled, Aurora, Nightly, and
* custom builds open about:, which provides an update interface.
* custom builds open about:firefox, which provides an update interface.
*
* If updating is not enabled, this simply logs an error.
*/
@ -2148,7 +2148,7 @@ public class BrowserApp extends GeckoApp
}
if (AppConstants.MOZ_UPDATER) {
Tabs.getInstance().loadUrlInTab(AboutPages.UPDATER);
Tabs.getInstance().loadUrlInTab(AboutPages.FIREFOX);
break;
}

Просмотреть файл

@ -5538,8 +5538,7 @@ var IdentityHandler = {
return this.IDENTITY_MODE_IDENTIFIED;
}
// We also allow "about:" by allowing the selector to be empty (i.e. '(|.....|...|...)'
let whitelist = /^about:($|about|accounts|addons|buildconfig|cache|config|crashes|devices|downloads|fennec|firefox|feedback|healthreport|home|license|logins|logo|memory|mozilla|networking|privatebrowsing|rights|serviceworkers|support|telemetry|webrtc)($|\?)/i;
let whitelist = /^about:(about|accounts|addons|buildconfig|cache|config|crashes|devices|downloads|fennec|firefox|feedback|healthreport|home|license|logins|logo|memory|mozilla|networking|privatebrowsing|rights|serviceworkers|support|telemetry|webrtc)($|\?)/i;
if (uri.schemeIs("about") && whitelist.test(uri.spec)) {
return this.IDENTITY_MODE_CHROMEUI;
}

Просмотреть файл

@ -63,7 +63,6 @@ chrome.jar:
% override chrome://mozapps/content/extensions/extensions.xul chrome://browser/content/aboutAddons.xhtml
# L10n resource overrides.
% override chrome://global/locale/about.dtd chrome://browser/locale/overrides/about.dtd
% override chrome://global/locale/aboutAbout.dtd chrome://browser/locale/overrides/aboutAbout.dtd
% override chrome://global/locale/aboutReader.properties chrome://browser/locale/overrides/aboutReader.properties
% override chrome://global/locale/aboutRights.dtd chrome://browser/locale/overrides/aboutRights.dtd

Просмотреть файл

@ -9,21 +9,15 @@ Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
var modules = {
// about:
"": {
uri: "chrome://browser/content/about.xhtml",
privileged: true
},
// about:fennec and about:firefox are aliases for about:,
// but hidden from about:about
fennec: {
uri: "chrome://browser/content/about.xhtml",
privileged: true,
hide: true
},
// about:firefox is an alias for about:fennec, but not hidden from about:about
get firefox() {
return this.fennec;
return Object.assign({}, this.fennec, {hide: false});
},
// about:blank has some bad loading behavior we can avoid, if we use an alias

Просмотреть файл

@ -22,8 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1099088
let chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
let IdentityHandler = chromeWin.IdentityHandler;
ok(IdentityHandler.getIdentityMode(0, Services.io.newURI("about:")) == IdentityHandler.IDENTITY_MODE_CHROMEUI,
"'about:' is a verified internal page");
ok(IdentityHandler.getIdentityMode(0, Services.io.newURI("about:firefox")) == IdentityHandler.IDENTITY_MODE_CHROMEUI,
"'about:firefox' is a verified internal page");
ok(IdentityHandler.getIdentityMode(0, Services.io.newURI("about:config")) == IdentityHandler.IDENTITY_MODE_CHROMEUI,
"'about:config' is a verified internal page");
ok(IdentityHandler.getIdentityMode(0, Services.io.newURI("about:accounts")) == IdentityHandler.IDENTITY_MODE_CHROMEUI,

Просмотреть файл

@ -6,22 +6,22 @@ package org.mozilla.gecko.tests;
import org.mozilla.gecko.Actions;
/* Tests related to the about: page:
* - check that about: loads from the URL bar
* - check that about: loads from Settings/About...
/* Tests related to the about:firefox page:
* - check that about:firefox loads from the URL bar
* - check that about:firefox loads from Settings/About...
*/
public class testAboutPage extends PixelTest {
public void testAboutPage() {
blockForGeckoReady();
// Load the about: page and verify its title.
String url = mStringHelper.ABOUT_SCHEME;
// Load the about:firefox page and verify its title.
String url = mStringHelper.ABOUT_SCHEME + "firefox";
loadAndPaint(url);
verifyUrlInContentDescription(url);
// Open a new page to remove the about: page from the current tab.
// Open a new page to remove the about:firefox page from the current tab.
url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL);
loadUrlAndWait(url);
@ -41,7 +41,7 @@ public class testAboutPage extends PixelTest {
tabEventExpecter.unregisterListener();
contentEventExpecter.unregisterListener();
// Make sure the about: page was loaded.
verifyUrlInContentDescription(mStringHelper.ABOUT_SCHEME);
// Make sure the about:firefox page was loaded.
verifyUrlInContentDescription(mStringHelper.ABOUT_SCHEME + "firefox");
}
}

Просмотреть файл

@ -26,22 +26,10 @@ body {
max-width: 80%;
}
#aboutLogoContainer {
border: 1px solid lightgray;
width: 300px;
margin-bottom: 2em;
}
img {
border: 0;
}
#version {
font-weight: bold;
color: #909090;
margin: -24px 0 9px 17px;
}
ul {
margin: 0;
margin-inline-start: 1.5em;