зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central. a=merge
This commit is contained in:
Коммит
5409753095
|
@ -1014,8 +1014,10 @@ var gIdentityHandler = {
|
|||
connection = "cert-error-page";
|
||||
} else if (this._isAboutHttpsOnlyErrorPage) {
|
||||
connection = "https-only-error-page";
|
||||
} else if (this._isAboutNetErrorPage || this._isAboutBlockedPage) {
|
||||
} else if (this._isAboutBlockedPage) {
|
||||
connection = "not-secure";
|
||||
} else if (this._isAboutNetErrorPage) {
|
||||
connection = "net-error-page";
|
||||
} else if (this._isPotentiallyTrustworthy) {
|
||||
connection = "file";
|
||||
}
|
||||
|
|
|
@ -499,6 +499,45 @@ add_task(async function test_about_net_error_uri_from_navigation_tab() {
|
|||
await noCertErrorFromNavigationTest(false);
|
||||
});
|
||||
|
||||
add_task(async function netErrorPageTest() {
|
||||
const TLS10_PAGE = "https://tls1.example.com/";
|
||||
Services.prefs.setIntPref("security.tls.version.min", 3);
|
||||
Services.prefs.setIntPref("security.tls.version.max", 4);
|
||||
|
||||
let browser;
|
||||
let pageLoaded;
|
||||
await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
() => {
|
||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, TLS10_PAGE);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
pageLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
info("Loading and waiting for the net error");
|
||||
await pageLoaded;
|
||||
|
||||
await SpecialPowers.spawn(browser, [], function() {
|
||||
const doc = content.document;
|
||||
ok(
|
||||
doc.documentURI.startsWith("about:neterror"),
|
||||
"Should be showing error page"
|
||||
);
|
||||
});
|
||||
|
||||
is(
|
||||
getConnectionState(),
|
||||
"net-error-page",
|
||||
"Connection should be the net error page."
|
||||
);
|
||||
|
||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
|
||||
async function aboutBlockedTest(secureCheck) {
|
||||
let url = "http://www.itisatrap.org/firefox/its-an-attack.html";
|
||||
let oldTab = await loadNewTab("about:robots");
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
when-connection="not-secure secure-cert-user-overridden secure-custom-root cert-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure"></description>
|
||||
<description class="identity-popup-connection-secure"
|
||||
when-connection="secure secure-ev" data-l10n-id="identity-connection-secure"></description>
|
||||
<description class="identity-popup-connection-failure"
|
||||
when-connection="net-error-page" data-l10n-id="identity-connection-failure"></description>
|
||||
<description when-connection="chrome" data-l10n-id="identity-connection-internal"></description>
|
||||
<description when-connection="file" data-l10n-id="identity-connection-file"></description>
|
||||
<description when-connection="extension" data-l10n-id="identity-extension-page"></description>
|
||||
|
@ -85,7 +87,7 @@
|
|||
</vbox>
|
||||
<button id="identity-popup-security-expander"
|
||||
class="identity-popup-expander"
|
||||
when-connection="not-secure secure secure-ev secure-cert-user-overridden cert-error-page https-only-error-page"
|
||||
when-connection="not-secure secure secure-ev secure-cert-user-overridden cert-error-page net-error-page https-only-error-page"
|
||||
oncommand="gIdentityHandler.showSecuritySubView();"/>
|
||||
</hbox>
|
||||
|
||||
|
@ -105,9 +107,9 @@
|
|||
descriptionheightworkaround="true">
|
||||
<vbox class="identity-popup-security-content">
|
||||
<vbox class="identity-popup-security-connection">
|
||||
<description class="identity-popup-connection-not-secure security-view"
|
||||
when-connection="not-secure secure-cert-user-overridden cert-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure-security-view"></description>
|
||||
<description class="identity-popup-connection-secure security-view"
|
||||
<description class="identity-popup-connection-not-secure"
|
||||
when-connection="not-secure secure-cert-user-overridden cert-error-page net-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure-security-view"></description>
|
||||
<description class="identity-popup-connection-secure"
|
||||
when-connection="secure secure-ev" data-l10n-id="identity-connection-verified"></description>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
@ -135,7 +137,7 @@
|
|||
oncommand="gIdentityHandler.removeCertException()"/>
|
||||
|
||||
<!-- Connection is Not Secure -->
|
||||
<description when-connection="not-secure cert-error-page https-only-error-page"
|
||||
<description when-connection="not-secure cert-error-page net-error-page https-only-error-page"
|
||||
data-l10n-id="identity-description-insecure"></description>
|
||||
|
||||
<!-- Weak Cipher -->
|
||||
|
|
|
@ -300,6 +300,7 @@ identity-header-security-with-host =
|
|||
.title = Connection security for { $host }
|
||||
identity-connection-not-secure = Connection not secure
|
||||
identity-connection-secure = Connection secure
|
||||
identity-connection-failure = Connection failure
|
||||
identity-connection-internal = This is a secure { -brand-short-name } page.
|
||||
identity-connection-file = This page is stored on your computer.
|
||||
identity-extension-page = This page is loaded from an extension.
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#identity-popup[connection=file] [when-connection~=file],
|
||||
#identity-popup[connection=extension] [when-connection~=extension],
|
||||
#identity-popup[connection=cert-error-page] [when-connection~=cert-error-page],
|
||||
#identity-popup[connection=net-error-page] [when-connection~=net-error-page],
|
||||
#identity-popup[connection=https-only-error-page] [when-connection~=https-only-error-page],
|
||||
/* Show weak cipher messages when needed. */
|
||||
#identity-popup[ciphers=weak] [when-ciphers~=weak],
|
||||
|
@ -466,6 +467,12 @@
|
|||
-moz-context-properties: fill;
|
||||
}
|
||||
|
||||
#identity-popup[connection=net-error-page] .identity-popup-security-connection {
|
||||
background-image: url(chrome://global/skin/icons/info.svg);
|
||||
fill: unset;
|
||||
-moz-context-properties: fill;
|
||||
}
|
||||
|
||||
#identity-popup[mixedcontent~=active-loaded][isbroken] .identity-popup-security-connection {
|
||||
background-image: url(chrome://browser/skin/controlcenter/mcb-disabled.svg);
|
||||
-moz-context-properties: fill;
|
||||
|
|
|
@ -742,11 +742,6 @@ ClientEngine.prototype = {
|
|||
importance: 0,
|
||||
desc: "Clear temporary local data for engine",
|
||||
},
|
||||
wipeAll: {
|
||||
args: 0,
|
||||
importance: 0,
|
||||
desc: "Delete all client data for all engines",
|
||||
},
|
||||
wipeEngine: {
|
||||
args: 1,
|
||||
importance: 0,
|
||||
|
@ -852,9 +847,6 @@ ClientEngine.prototype = {
|
|||
case "resetEngine":
|
||||
await this.service.resetClient(engines);
|
||||
break;
|
||||
case "wipeAll":
|
||||
engines = null;
|
||||
// Fallthrough
|
||||
case "wipeEngine":
|
||||
await this.service.wipeClient(engines);
|
||||
break;
|
||||
|
|
|
@ -1566,8 +1566,8 @@ Sync11Service.prototype = {
|
|||
* Wipe all remote user data by wiping the server then telling each remote
|
||||
* client to wipe itself.
|
||||
*
|
||||
* @param engines [optional]
|
||||
* Array of engine names to wipe. If not given, all engines are used.
|
||||
* @param engines
|
||||
* Array of engine names to wipe.
|
||||
*/
|
||||
async wipeRemote(engines) {
|
||||
try {
|
||||
|
@ -1579,13 +1579,8 @@ Sync11Service.prototype = {
|
|||
|
||||
// Only wipe the engines provided.
|
||||
let extra = { reason: "wipe-remote" };
|
||||
if (engines) {
|
||||
for (const e of engines) {
|
||||
await this.clientsEngine.sendCommand("wipeEngine", [e], null, extra);
|
||||
}
|
||||
} else {
|
||||
// Tell the remote machines to wipe themselves.
|
||||
await this.clientsEngine.sendCommand("wipeAll", [], null, extra);
|
||||
for (const e of engines) {
|
||||
await this.clientsEngine.sendCommand("wipeEngine", [e], null, extra);
|
||||
}
|
||||
|
||||
// Make sure the changed clients get updated.
|
||||
|
|
|
@ -547,8 +547,6 @@ add_task(async function test_command_validation() {
|
|||
["resetAll", ["foo"], false],
|
||||
["resetEngine", ["tabs"], true],
|
||||
["resetEngine", [], false],
|
||||
["wipeAll", [], true],
|
||||
["wipeAll", ["foo"], false],
|
||||
["wipeEngine", ["tabs"], true],
|
||||
["wipeEngine", [], false],
|
||||
["logout", [], true],
|
||||
|
@ -634,7 +632,7 @@ add_task(async function test_command_invalid_client() {
|
|||
let error;
|
||||
|
||||
try {
|
||||
await engine.sendCommand("wipeAll", [], id);
|
||||
await engine.sendCommand("wipeEngine", ["tabs"], id);
|
||||
} catch (ex) {
|
||||
error = ex;
|
||||
}
|
||||
|
@ -909,7 +907,7 @@ add_task(async function test_command_sync() {
|
|||
equal(clientRecord.commands.length, 0);
|
||||
|
||||
_("Send a command to the remote client.");
|
||||
await engine.sendCommand("wipeAll", []);
|
||||
await engine.sendCommand("wipeEngine", ["tabs"]);
|
||||
let clientCommands = (await engine._readCommands())[remoteId];
|
||||
equal(clientCommands.length, 1);
|
||||
await syncClientsEngine(server);
|
||||
|
@ -930,8 +928,9 @@ add_task(async function test_command_sync() {
|
|||
equal(engine.localCommands.length, 1);
|
||||
|
||||
let command = engine.localCommands[0];
|
||||
equal(command.command, "wipeAll");
|
||||
equal(command.args.length, 0);
|
||||
equal(command.command, "wipeEngine");
|
||||
equal(command.args.length, 1);
|
||||
equal(command.args[0], "tabs");
|
||||
} finally {
|
||||
await cleanup();
|
||||
|
||||
|
@ -1937,7 +1936,7 @@ add_task(async function test_command_sync() {
|
|||
"3 remote records written (+1 for the synced local record)"
|
||||
);
|
||||
|
||||
await engine.sendCommand("wipeAll", []);
|
||||
await engine.sendCommand("wipeEngine", ["tabs"]);
|
||||
await engine._tracker.addChangedID(engine.localID);
|
||||
const getClientFxaDeviceId = sinon
|
||||
.stub(engine, "getClientFxaDeviceId")
|
||||
|
@ -2002,7 +2001,7 @@ add_task(async function ensureSameFlowIDs() {
|
|||
});
|
||||
|
||||
await syncClientsEngine(server);
|
||||
await engine.sendCommand("wipeAll", []);
|
||||
await engine.sendCommand("wipeEngine", ["tabs"]);
|
||||
await syncClientsEngine(server);
|
||||
equal(events.length, 2);
|
||||
// we don't know what the flowID is, but do know it should be the same.
|
||||
|
@ -2014,7 +2013,7 @@ add_task(async function ensureSameFlowIDs() {
|
|||
// check it's correctly used when we specify a flow ID
|
||||
events.length = 0;
|
||||
let flowID = Utils.makeGUID();
|
||||
await engine.sendCommand("wipeAll", [], null, { flowID });
|
||||
await engine.sendCommand("wipeEngine", ["tabs"], null, { flowID });
|
||||
await syncClientsEngine(server);
|
||||
equal(events.length, 2);
|
||||
equal(events[0].extra.flowID, flowID);
|
||||
|
@ -2027,7 +2026,9 @@ add_task(async function ensureSameFlowIDs() {
|
|||
|
||||
// and that it works when something else is in "extra"
|
||||
events.length = 0;
|
||||
await engine.sendCommand("wipeAll", [], null, { reason: "testing" });
|
||||
await engine.sendCommand("wipeEngine", ["tabs"], null, {
|
||||
reason: "testing",
|
||||
});
|
||||
await syncClientsEngine(server);
|
||||
equal(events.length, 2);
|
||||
equal(events[0].extra.flowID, events[1].extra.flowID);
|
||||
|
@ -2040,7 +2041,7 @@ add_task(async function ensureSameFlowIDs() {
|
|||
|
||||
// and when both are specified.
|
||||
events.length = 0;
|
||||
await engine.sendCommand("wipeAll", [], null, {
|
||||
await engine.sendCommand("wipeEngine", ["tabs"], null, {
|
||||
reason: "testing",
|
||||
flowID,
|
||||
});
|
||||
|
|
|
@ -237,6 +237,9 @@ const FullLookAndFeel* RemoteLookAndFeel::ExtractData() {
|
|||
impl->GetGtkContentTheme(lf->theme());
|
||||
#endif
|
||||
|
||||
lf->tables().passwordChar() = impl->GetPasswordCharacterImpl();
|
||||
lf->tables().passwordEcho() = impl->GetEchoPasswordImpl();
|
||||
|
||||
AddIDsToMap(impl, lf);
|
||||
|
||||
// This assignment to sCachedLookAndFeelData must be done after the
|
||||
|
|
Загрузка…
Ссылка в новой задаче