Skip to content

Commit

Permalink
merge fx-team to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Jan 28, 2015
2 parents 1d1590c + 9342641 commit 8aced6d
Show file tree
Hide file tree
Showing 85 changed files with 2,824 additions and 281 deletions.
8 changes: 0 additions & 8 deletions b2g/components/HelperAppDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ HelperAppLauncherDialog.prototype = {
aLauncher.saveToDisk(null, false);
},

promptForSaveToFile: function(aLauncher,
aContext,
aDefaultFile,
aSuggestedFileExt,
aForcePrompt) {
throw Cr.NS_ERROR_NOT_AVAILABLE;
},

promptForSaveToFileAsync: function(aLauncher,
aContext,
aDefaultFile,
Expand Down
13 changes: 9 additions & 4 deletions browser/base/content/aboutNetError.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,15 @@
}

window.addEventListener("AboutNetErrorOptions", function(evt) {
// Pinning errors are of type nssFailure2 (don't ask me why)
// Pinning errors are of type nssFailure2
if (getErrorCode() == "nssFailure2" && !errTitle.hasAttribute("sslv3")) {
// TODO: and the pref is set...
var learnMoreLink = document.getElementById("learnMoreLink");
// nssFailure2 also gets us other non-overrideable errors. Choose
// a "learn more" link based on description:
if (getDescription().contains("mozilla_pkix_error_key_pinning_failure")) {
learnMoreLink.href = "https://support.mozilla.org/kb/certificate-pinning-reports";
}

var options = JSON.parse(evt.detail);
if (options && options.enabled) {
var checkbox = document.getElementById('automaticallyReportInFuture');
Expand Down Expand Up @@ -476,8 +482,7 @@
<input type="checkbox" id="automaticallyReportInFuture" />
<label for="automaticallyReportInFuture" id="automaticallyReportInFuture">&errorReporting.automatic;</label>
</p>
<!-- TODO add link to relevant page on sumo -->
<a href="https://support.mozilla.org/kb/certificate-pinning-reports" target="new">&errorReporting.learnMore;</a>
<a href="https://support.mozilla.org/kb/tls-error-reports" id="learnMoreLink" target="new">&errorReporting.learnMore;</a>
<span id="reportingState">
<button id="reportCertificateError">&errorReporting.report;</button>
<button id="reportCertificateErrorRetry">&errorReporting.tryAgain;</button>
Expand Down
3 changes: 3 additions & 0 deletions browser/base/content/urlbarBindings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,9 @@
onSuccess: function(engine) {
event.target.hidePopup();
BrowserSearch.searchBar.openSuggestionsPanel();
},
onError: function(errorCode) {
Components.utils.reportError("Error adding search engine: " + errorCode);
}
}
Services.search.addEngine(target.getAttribute("uri"),
Expand Down
1 change: 0 additions & 1 deletion browser/components/loop/content/libs/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
function translateString(key, args, fallback) {
if (args && args.num) {
var num = args && args.num;
delete args.num;
}
var data = getL10nData(key, num);
if (!data && fallback)
Expand Down
1 change: 1 addition & 0 deletions browser/components/loop/test/desktop-local/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<script src="roomViews_test.js"></script>
<script src="conversationViews_test.js"></script>
<script src="contacts_test.js"></script>
<script src="l10n_test.js"></script>
<script>
// Stop the default init functions running to avoid conflicts in tests
document.removeEventListener('DOMContentLoaded', loop.panel.init);
Expand Down
37 changes: 37 additions & 0 deletions browser/components/loop/test/desktop-local/l10n_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* 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,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

var expect = chai.expect;

describe("document.mozL10n", function() {
"use strict";

var fakeMozLoop;

beforeEach(function() {
fakeMozLoop = {
locale: "en-US",
getStrings: function(key) {
if (key === "plural") {
return '{"textContent":"{{num}} plural form;{{num}} plural forms"}';
}

return '{"textContent":"' + key + '"}';
},
getPluralForm: function(num, string) {
return string.split(";")[num === 0 ? 0 : 1];
}
};

document.mozL10n.initialize(fakeMozLoop);
});

it("should get a simple string", function() {
expect(document.mozL10n.get("test")).eql("test");
});

it("should get a plural form", function() {
expect(document.mozL10n.get("plural", {num:10})).eql("10 plural forms");
});
});
6 changes: 3 additions & 3 deletions browser/components/loop/test/functional/serversetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
CONTENT_SERVER_ENV.update({"PORT": str(CONTENT_SERVER_PORT),
"LOOP_SERVER_PORT": str(LOOP_SERVER_PORT)})

WEB_APP_URL = "http://localhost:" + str(CONTENT_SERVER_PORT) + \
"/content/#call/{token}"
ROOMS_WEB_APP_URL = "http://localhost:" + str(CONTENT_SERVER_PORT) + \
"/content/{token}"

LOOP_SERVER_COMMAND = ["make", "runserver"]
LOOP_SERVER_ENV = os.environ.copy()
Expand All @@ -33,7 +33,7 @@
LOOP_SERVER_ENV.update({"NODE_ENV": "dev",
"PORT": str(LOOP_SERVER_PORT),
"SERVER_ADDRESS": "localhost:" + str(LOOP_SERVER_PORT),
"WEB_APP_URL": WEB_APP_URL})
"ROOMS_WEB_APP_URL": ROOMS_WEB_APP_URL})


class LoopTestServers:
Expand Down
17 changes: 8 additions & 9 deletions browser/components/loop/test/functional/test_1_browser_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,14 @@ def standalone_load_and_join_room(self, url):

# Assumes the standlone or the conversation window is selected first.
def check_remote_video(self):
# TODO: This is disabled currently due to bug 1122486
# video_wrapper = self.wait_for_element_displayed(By.CSS_SELECTOR, ".media .OT_subscriber .OT_video-container", 20)
# video = self.wait_for_subelement_displayed(video_wrapper, By.TAG_NAME, "video")

# self.wait_for_element_attribute_to_be_false(video, "paused")
# self.assertEqual(video.get_attribute("ended"), "false")

# Due to the above waits being disabled, we do a sleep.
sleep(15)
video_wrapper = self.wait_for_element_displayed(
By.CSS_SELECTOR,
".media .OT_subscriber .OT_video-container", 20)
video = self.wait_for_subelement_displayed(
video_wrapper, By.TAG_NAME, "video")

self.wait_for_element_attribute_to_be_false(video, "paused")
self.assertEqual(video.get_attribute("ended"), "false")

def standalone_check_remote_video(self):
self.switch_to_standalone()
Expand Down
18 changes: 17 additions & 1 deletion browser/components/preferences/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ var gAdvancedPane = {
}

#ifdef MOZ_UPDATER
let onUnload = function () {
window.removeEventListener("unload", onUnload, false);
Services.prefs.removeObserver("app.update.", this);
}.bind(this);
window.addEventListener("unload", onUnload, false);
Services.prefs.addObserver("app.update.", this, false);
this.updateReadPrefs();
#endif
this.updateOfflineApps();
Expand Down Expand Up @@ -822,5 +828,15 @@ var gAdvancedPane = {
document.documentElement.openWindow("mozilla:devicemanager",
"chrome://pippki/content/device_manager.xul",
"", null);
}
},

#ifdef MOZ_UPDATER
observe: function (aSubject, aTopic, aData) {
switch(aTopic) {
case "nsPref:changed":
this.updateReadPrefs();
break;
}
},
#endif
};
18 changes: 17 additions & 1 deletion browser/components/preferences/in-content/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ var gAdvancedPane = {
advancedPrefs.selectedIndex = preference.value;

#ifdef MOZ_UPDATER
let onUnload = function () {
window.removeEventListener("unload", onUnload, false);
Services.prefs.removeObserver("app.update.", this);
}.bind(this);
window.addEventListener("unload", onUnload, false);
Services.prefs.addObserver("app.update.", this, false);
this.updateReadPrefs();
#endif
this.updateOfflineApps();
Expand Down Expand Up @@ -841,5 +847,15 @@ var gAdvancedPane = {
openDialog("chrome://pippki/content/device_manager.xul",
"mozilla:devicemanager",
"modal=yes", null);
}
},

#ifdef MOZ_UPDATER
observe: function (aSubject, aTopic, aData) {
switch(aTopic) {
case "nsPref:changed":
this.updateReadPrefs();
break;
}
},
#endif
};
9 changes: 9 additions & 0 deletions browser/components/uitour/UITour-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ if (typeof Mozilla == 'undefined') {
});
};

Mozilla.UITour.showHeartbeat = function(message, thankyouMessage, flowId, engagementURL) {
_sendEvent('showHeartbeat', {
message: message,
thankyouMessage: thankyouMessage,
flowId: flowId,
engagementURL: engagementURL
});
};

Mozilla.UITour.showHighlight = function(target, effect) {
_sendEvent('showHighlight', {
target: target,
Expand Down
Loading

0 comments on commit 8aced6d

Please sign in to comment.