From 5924d46107fb3bfb29c85c934a42aae016498aa5 Mon Sep 17 00:00:00 2001 From: Paolo Amadini Date: Fri, 30 Oct 2015 14:36:13 +0000 Subject: [PATCH 1/6] Bug 1216699 - Add Learn More link to Insecure Password Warning in Control Center. r=bgrins --HG-- extra : commitid : KNjyMETahMC extra : rebase_source : f0498fe7a4a85731350172935252bb414b7503a8 --- browser/base/content/browser.js | 13 ++++++++++--- .../test/general/browser_insecureLoginForms.js | 3 +++ .../components/controlcenter/content/panel.inc.xul | 3 ++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 95afdf92d3fa..38805805bf0e 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6968,6 +6968,11 @@ var gIdentityHandler = { return this._identityPopupMixedContentLearnMore = document.getElementById("identity-popup-mcb-learn-more"); }, + get _identityPopupInsecureLoginFormsLearnMore () { + delete this._identityPopupInsecureLoginFormsLearnMore; + return this._identityPopupInsecureLoginFormsLearnMore = + document.getElementById("identity-popup-insecure-login-forms-learn-more"); + }, get _identityIconLabel () { delete this._identityIconLabel; return this._identityIconLabel = document.getElementById("identity-icon-label"); @@ -7289,10 +7294,12 @@ var gIdentityHandler = { * applicable */ refreshIdentityPopup() { - // Update the "Learn More" hrefs for Mixed Content Blocking. + // Update "Learn More" for Mixed Content Blocking and Insecure Login Forms. let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL"); - let learnMoreHref = `${baseURL}mixed-content`; - this._identityPopupMixedContentLearnMore.setAttribute("href", learnMoreHref); + this._identityPopupMixedContentLearnMore + .setAttribute("href", baseURL + "mixed-content"); + this._identityPopupInsecureLoginFormsLearnMore + .setAttribute("href", baseURL + "insecure-password"); // Determine connection security information. let connection = "not-secure"; diff --git a/browser/base/content/test/general/browser_insecureLoginForms.js b/browser/base/content/test/general/browser_insecureLoginForms.js index 053409438fb9..bc80c29e54fe 100644 --- a/browser/base/content/test/general/browser_insecureLoginForms.js +++ b/browser/base/content/test/general/browser_insecureLoginForms.js @@ -55,6 +55,9 @@ add_task(function* test_simple() { is(securityContentBG, "url(\"chrome://browser/skin/controlcenter/mcb-disabled.svg\")", "Using expected icon image in the Control Center subview"); + is(Array.filter(document.querySelectorAll("[observes=identity-popup-insecure-login-forms-learn-more]"), + element => !is_hidden(element)).length, 1, + "The 'Learn more' link should be visible once."); } // Messages should be visible when the scheme is HTTP, and invisible when diff --git a/browser/components/controlcenter/content/panel.inc.xul b/browser/components/controlcenter/content/panel.inc.xul index 205a7df6ca83..e0e094cf4dca 100644 --- a/browser/components/controlcenter/content/panel.inc.xul +++ b/browser/components/controlcenter/content/panel.inc.xul @@ -12,6 +12,7 @@ + &identity.description.insecure; - &identity.description.insecureLoginForms; + &identity.description.insecureLoginForms; &identity.description.weakCipher; From 86c3cc806e847b5e0d51a72cb81c30377c9c2937 Mon Sep 17 00:00:00 2001 From: David Critchley Date: Fri, 30 Oct 2015 11:48:22 -0700 Subject: [PATCH 2/6] Bug 1214590 - Remove Loop default Room name, r=dmose --- browser/components/loop/content/js/panel.js | 4 +- browser/components/loop/content/js/panel.jsx | 4 +- .../components/loop/content/js/roomStore.js | 39 +--------------- .../loop/content/shared/js/actions.js | 3 -- .../loop/test/desktop-local/panel_test.js | 1 - .../loop/test/desktop-local/roomStore_test.js | 46 +------------------ .../en-US/chrome/browser/loop/loop.properties | 3 -- 7 files changed, 5 insertions(+), 95 deletions(-) diff --git a/browser/components/loop/content/js/panel.js b/browser/components/loop/content/js/panel.js index 5b3c050f5034..124e987141ad 100644 --- a/browser/components/loop/content/js/panel.js +++ b/browser/components/loop/content/js/panel.js @@ -806,9 +806,7 @@ loop.panel = (function(_, mozL10n) { }, handleCreateButtonClick: function() { - var createRoomAction = new sharedActions.CreateRoom({ - nameTemplate: mozL10n.get("rooms_default_room_name_template") - }); + var createRoomAction = new sharedActions.CreateRoom(); createRoomAction.urls = [{ location: this.state.url, diff --git a/browser/components/loop/content/js/panel.jsx b/browser/components/loop/content/js/panel.jsx index fde908d04fcc..18966028b2cb 100644 --- a/browser/components/loop/content/js/panel.jsx +++ b/browser/components/loop/content/js/panel.jsx @@ -806,9 +806,7 @@ loop.panel = (function(_, mozL10n) { }, handleCreateButtonClick: function() { - var createRoomAction = new sharedActions.CreateRoom({ - nameTemplate: mozL10n.get("rooms_default_room_name_template") - }); + var createRoomAction = new sharedActions.CreateRoom(); createRoomAction.urls = [{ location: this.state.url, diff --git a/browser/components/loop/content/js/roomStore.js b/browser/components/loop/content/js/roomStore.js index c3b126ea6f53..4ba3e467a086 100644 --- a/browser/components/loop/content/js/roomStore.js +++ b/browser/components/loop/content/js/roomStore.js @@ -239,40 +239,6 @@ loop.store = loop.store || {}; }); }, - /** - * Finds the next available room number in the provided room list. - * - * @param {String} nameTemplate The room name template; should contain a - * {{conversationLabel}} placeholder. - * @return {Number} - */ - findNextAvailableRoomNumber: function(nameTemplate) { - var searchTemplate = nameTemplate.replace("{{conversationLabel}}", ""); - var searchRegExp = new RegExp("^" + searchTemplate + "(\\d+)$"); - - var roomNumbers = this._storeState.rooms.map(function(room) { - var match = searchRegExp.exec(room.decryptedContext.roomName); - return match && match[1] ? parseInt(match[1], 10) : 0; - }); - - if (!roomNumbers.length) { - return 1; - } - - return Math.max.apply(null, roomNumbers) + 1; - }, - - /** - * Generates a room names against the passed template string. - * - * @param {String} nameTemplate The room name template. - * @return {String} - */ - _generateNewRoomName: function(nameTemplate) { - var roomLabel = this.findNextAvailableRoomNumber(nameTemplate); - return nameTemplate.replace("{{conversationLabel}}", roomLabel); - }, - /** * Creates a new room. * @@ -285,9 +251,7 @@ loop.store = loop.store || {}; }); var roomCreationData = { - decryptedContext: { - roomName: this._generateNewRoomName(actionData.nameTemplate) - }, + decryptedContext: {}, maxSize: this.maxRoomCreationSize }; @@ -296,7 +260,6 @@ loop.store = loop.store || {}; } this._notifications.remove("create-room-error"); - this._mozLoop.rooms.create(roomCreationData, function(err, createdRoom) { var buckets = this._mozLoop.ROOM_CREATE; if (err) { diff --git a/browser/components/loop/content/shared/js/actions.js b/browser/components/loop/content/shared/js/actions.js index 43ebf1152f43..2b74d457a9b9 100644 --- a/browser/components/loop/content/shared/js/actions.js +++ b/browser/components/loop/content/shared/js/actions.js @@ -241,9 +241,6 @@ loop.shared.actions = (function() { * XXX: should move to some roomActions module - refs bug 1079284 */ CreateRoom: Action.define("createRoom", { - // The localized template to use to name the new room - // (eg. "Conversation {{conversationLabel}}"). - nameTemplate: String // See https://wiki.mozilla.org/Loop/Architecture/Context#Format_of_context.value // urls: Object - Optional }), diff --git a/browser/components/loop/test/desktop-local/panel_test.js b/browser/components/loop/test/desktop-local/panel_test.js index fe5f71f620f4..5ae5e0a02ce8 100644 --- a/browser/components/loop/test/desktop-local/panel_test.js +++ b/browser/components/loop/test/desktop-local/panel_test.js @@ -1000,7 +1000,6 @@ describe("loop.panel", function() { TestUtils.Simulate.click(node.querySelector(".new-room-button")); sinon.assert.calledWith(dispatch, new sharedActions.CreateRoom({ - nameTemplate: "Fake title", urls: [{ location: "http://invalid.com", description: "fakeSite", diff --git a/browser/components/loop/test/desktop-local/roomStore_test.js b/browser/components/loop/test/desktop-local/roomStore_test.js index 6ece3bff10b0..474300cc5e27 100644 --- a/browser/components/loop/test/desktop-local/roomStore_test.js +++ b/browser/components/loop/test/desktop-local/roomStore_test.js @@ -214,44 +214,7 @@ describe("loop.store.RoomStore", function() { }); }); - describe("#findNextAvailableRoomNumber", function() { - var fakeNameTemplate = "RoomWord {{conversationLabel}}"; - - it("should find next available room number from an empty room list", - function() { - store.setStoreState({ rooms: [] }); - - expect(store.findNextAvailableRoomNumber(fakeNameTemplate)).eql(1); - }); - - it("should find next available room number from a non empty room list", - function() { - store.setStoreState({ - rooms: [{ decryptedContext: { roomName: "RoomWord 1" } }] - }); - - expect(store.findNextAvailableRoomNumber(fakeNameTemplate)).eql(2); - }); - - it("should not be sensitive to initial list order", function() { - store.setStoreState({ - rooms: [{ - decryptedContext: { - roomName: "RoomWord 99" - } - }, { - decryptedContext: { - roomName: "RoomWord 98" - } - }] - }); - - expect(store.findNextAvailableRoomNumber(fakeNameTemplate)).eql(100); - }); - }); - describe("#createRoom", function() { - var fakeNameTemplate = "Conversation {{conversationLabel}}"; var fakeLocalRoomId = "777"; var fakeOwner = "fake@invalid"; var fakeRoomCreationData; @@ -259,9 +222,7 @@ describe("loop.store.RoomStore", function() { beforeEach(function() { sandbox.stub(dispatcher, "dispatch"); store.setStoreState({ pendingCreation: false, rooms: [] }); - fakeRoomCreationData = { - nameTemplate: fakeNameTemplate - }; + fakeRoomCreationData = {}; }); it("should clear any existing room errors", function() { @@ -298,9 +259,7 @@ describe("loop.store.RoomStore", function() { store.createRoom(new sharedActions.CreateRoom(fakeRoomCreationData)); sinon.assert.calledWith(fakeMozLoop.rooms.create, { - decryptedContext: { - roomName: "Conversation 1" - }, + decryptedContext: { }, maxSize: store.maxRoomCreationSize }); }); @@ -318,7 +277,6 @@ describe("loop.store.RoomStore", function() { sinon.assert.calledWith(fakeMozLoop.rooms.create, { decryptedContext: { - roomName: "Conversation 1", urls: [{ location: "http://invalid.com", description: "fakeSite", diff --git a/browser/locales/en-US/chrome/browser/loop/loop.properties b/browser/locales/en-US/chrome/browser/loop/loop.properties index e0f03a2ca0fa..768e968657b7 100644 --- a/browser/locales/en-US/chrome/browser/loop/loop.properties +++ b/browser/locales/en-US/chrome/browser/loop/loop.properties @@ -179,9 +179,6 @@ feedback_request_button=Leave Feedback help_label=Help tour_label=Tour -## LOCALIZATION NOTE(rooms_default_room_name_template): {{conversationLabel}} -## will be replaced by a number. For example "Conversation 1" or "Conversation 12". -rooms_default_room_name_template=Conversation {{conversationLabel}} rooms_leave_button_label=Leave ## LOCALIZATION NOTE (rooms_list_recently_browsed): String is in all caps ## for emphasis reasons, it is a heading. Proceed as appropriate for locale. From 40edfd42a3b20287a68c6ef74fedd3b8e7dc351b Mon Sep 17 00:00:00 2001 From: David Critchley Date: Fri, 30 Oct 2015 12:25:51 -0700 Subject: [PATCH 3/6] Bug 1219740 - Add Beta Ribbon back in to Hello, r=dmose --- browser/components/loop/content/css/panel.css | 15 +++++++++++++++ browser/components/loop/content/js/panel.js | 1 + browser/components/loop/content/js/panel.jsx | 1 + 3 files changed, 17 insertions(+) diff --git a/browser/components/loop/content/css/panel.css b/browser/components/loop/content/css/panel.css index ae16bb593c2f..5551415a41ea 100644 --- a/browser/components/loop/content/css/panel.css +++ b/browser/components/loop/content/css/panel.css @@ -10,6 +10,14 @@ body { background: none; } +/* Beta Ribbon */ +.beta-ribbon { + background: url("../shared/img/beta-ribbon.svg") no-repeat; + background-size: 30px; + width: 30px; + height: 30px; +} + /* Panel styles */ .panel { @@ -30,6 +38,13 @@ body { align-items: flex-start; } +.panel-content > .beta-ribbon { + position: fixed; + left: 0; + top: 0; + z-index: 1000; +} + /* Notifications displayed over tabs */ .panel .messages { diff --git a/browser/components/loop/content/js/panel.js b/browser/components/loop/content/js/panel.js index 124e987141ad..cd76c935522e 100644 --- a/browser/components/loop/content/js/panel.js +++ b/browser/components/loop/content/js/panel.js @@ -942,6 +942,7 @@ loop.panel = (function(_, mozL10n) { return ( React.createElement("div", {className: "panel-content"}, + React.createElement("div", {className: "beta-ribbon"}), React.createElement(NotificationListView, { clearOnDocumentHidden: true, notifications: this.props.notifications}), diff --git a/browser/components/loop/content/js/panel.jsx b/browser/components/loop/content/js/panel.jsx index 18966028b2cb..5c4755023897 100644 --- a/browser/components/loop/content/js/panel.jsx +++ b/browser/components/loop/content/js/panel.jsx @@ -942,6 +942,7 @@ loop.panel = (function(_, mozL10n) { return (
+
From ff2f217efc005efa501abfb1f7100e89aabee385 Mon Sep 17 00:00:00 2001 From: Jordan Lund Date: Fri, 30 Oct 2015 21:20:22 -0700 Subject: [PATCH 4/6] Bug 1212616 - b2gdroid updates, remove IS_NIGHTLY from env, r=catlee, a=testing --HG-- extra : amend_source : 3e22adce12aac7af668c2c34fe5319e774861ba0 --- testing/mozharness/mozharness/mozilla/building/buildbase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py index c24169f8167c..b9c84a730738 100755 --- a/testing/mozharness/mozharness/mozilla/building/buildbase.py +++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py @@ -839,7 +839,10 @@ or run without that action (ie: --no-{action})" env['MOZ_BUILD_DATE'] = self.query_buildid() if self.query_is_nightly() or self.query_is_nightly_promotion(): - env["IS_NIGHTLY"] = "yes" + if self.query_is_nightly(): + # nightly promotion needs to set update_channel but not do all the 'IS_NIGHTLY' + # automation parts like uploading symbols for now + env["IS_NIGHTLY"] = "yes" # in branch_specifics.py we might set update_channel explicitly if c.get('update_channel'): env["MOZ_UPDATE_CHANNEL"] = c['update_channel'] From f24fea9d1a7c167df6eaaacd940ebbb06f2cba12 Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Fri, 30 Oct 2015 22:19:56 -0700 Subject: [PATCH 5/6] Bug 643633 - Remove TTLs from form history records. r=markh,nalexander --HG-- extra : commitid : HxQHAP2SacO --- .../base/sync/repositories/domain/FormHistoryRecord.java | 2 +- services/sync/modules/engines/forms.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java b/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java index 4209c2256170..5c1f10dd21fe 100644 --- a/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java +++ b/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java @@ -22,7 +22,7 @@ public class FormHistoryRecord extends Record { public static final String COLLECTION_NAME = "forms"; private static final String PAYLOAD_NAME = "name"; private static final String PAYLOAD_VALUE = "value"; - public static final long FORMS_TTL = 60 * 24 * 60 * 60; // 60 days in seconds. + public static final long FORMS_TTL = 3 * 365 * 24 * 60 * 60; // Three years in seconds. /** * The name of the saved form field. diff --git a/services/sync/modules/engines/forms.js b/services/sync/modules/engines/forms.js index 7ddb7a90b441..dc84485bf1b6 100644 --- a/services/sync/modules/engines/forms.js +++ b/services/sync/modules/engines/forms.js @@ -16,7 +16,7 @@ Cu.import("resource://services-sync/util.js"); Cu.import("resource://services-sync/constants.js"); Cu.import("resource://gre/modules/Log.jsm"); -const FORMS_TTL = 5184000; // 60 days +const FORMS_TTL = 3 * 365 * 24 * 60 * 60; // Three years in seconds. this.FormRec = function FormRec(collection, id) { CryptoWrapper.call(this, collection, id); From ee133293f5fd39c4eee9b0a9ff33d7c03c0b29f4 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sat, 31 Oct 2015 16:41:41 -0700 Subject: [PATCH 6/6] Bug 1217332 - disable browser_syncui.js on OS X debug for a completely ridiculous assertion failure rate, a=toporange --- browser/base/content/test/general/browser.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index 97c3dfbf189f..8b2ab98e2179 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -403,6 +403,7 @@ run-if = e10s [browser_star_hsts.js] [browser_subframe_favicons_not_used.js] [browser_syncui.js] +skip-if = os == "mac" && debug # Bug 1217332 [browser_tabDrop.js] skip-if = buildapp == 'mulet' || e10s [browser_tabReorder.js]