Commit b68928df authored by Ed Morley's avatar Ed Morley
Browse files

Merge last PGO-green changeset of mozilla-inbound to mozilla-central

parents be8e152c a86a12d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@
      </html:select>
    </markup>

<!-- Temporarily disabled for causing bug 733848
    <markup ref="html:img" ruleset="htmlimage">
      <html:span id="l1" a11yname="test2">test2</html:span>
      <html:span id="l2" a11yname="test3">test3</html:span>
@@ -223,6 +224,7 @@
                 alt=""
                 src="../moz.png"/>
    </markup>
-->

    <markup ref="html:table/html:tr/html:td" ruleset="htmlelm"
            id="markup4test">
+3 −0
Original line number Diff line number Diff line
@@ -77,14 +77,17 @@ const gXPInstallObserver = {
      messageString = gNavigatorBundle.getFormattedString("xpinstallPromptWarning",
                        [brandShortName, installInfo.originatingURI.host]);

      let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI");
      action = {
        label: gNavigatorBundle.getString("xpinstallPromptAllowButton"),
        accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"),
        callback: function() {
          secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH);
          installInfo.install();
        }
      };

      secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
      PopupNotifications.show(browser, notificationID, messageString, anchorID,
                              action, null, options);
      break;
+2 −2
Original line number Diff line number Diff line
@@ -160,10 +160,10 @@ let SocialShareButton = {
  updateProfileInfo: function SSB_updateProfileInfo() {
    let profileRow = document.getElementById("editSharePopupHeader");
    let profile = Social.provider.profile;
    if (profile && profile.portrait && profile.displayName) {
    if (profile && profile.displayName) {
      profileRow.hidden = false;
      let portrait = document.getElementById("socialUserPortrait");
      portrait.style.listStyleImage = profile.portrait;
      portrait.setAttribute("src", profile.portrait || "chrome://browser/skin/social/social.png");
      let displayName = document.getElementById("socialUserDisplayName");
      displayName.setAttribute("label", profile.displayName);
    } else {
+25 −0
Original line number Diff line number Diff line
@@ -2519,9 +2519,13 @@ let BrowserOnClick = {

  onAboutCertError: function BrowserOnClick_onAboutCertError(aTargetElm, aOwnerDoc) {
    let elmId = aTargetElm.getAttribute("id");
    let secHistogram = Cc["@mozilla.org/base/telemetry;1"].
                        getService(Ci.nsITelemetry).
                        getHistogramById("SECURITY_UI");

    switch (elmId) {
      case "exceptionDialogButton":
        secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_CLICK_ADD_EXCEPTION);
        let params = { exceptionAdded : false, handlePrivateBrowsing : true };

        try {
@@ -2545,21 +2549,37 @@ let BrowserOnClick = {
        break;

      case "getMeOutOfHereButton":
        secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_GET_ME_OUT_OF_HERE);
        getMeOutOfHere();
        break;

      case "technicalContent":
        secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TECHNICAL_DETAILS);
        break;

      case "expertContent":
        secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_UNDERSTAND_RISKS);
        break;

    }
  },

  onAboutBlocked: function BrowserOnClick_onAboutBlocked(aTargetElm, aOwnerDoc) {
    let elmId = aTargetElm.getAttribute("id");
    let secHistogram = Cc["@mozilla.org/base/telemetry;1"].
                        getService(Ci.nsITelemetry).
                        getHistogramById("SECURITY_UI");

    // The event came from a button on a malware/phishing block page
    // First check whether it's malware or phishing, so that we can
    // use the right strings/links
    let isMalware = /e=malwareBlocked/.test(aOwnerDoc.documentURI);
    let bucketName = isMalware ? "WARNING_MALWARE_PAGE_":"WARNING_PHISHING_PAGE_";
    let nsISecTel = Ci.nsISecurityUITelemetry;

    switch (elmId) {
      case "getMeOutButton":
        secHistogram.add(nsISecTel[bucketName + "GET_ME_OUT_OF_HERE"]);
        getMeOutOfHere();
        break;

@@ -2568,6 +2588,10 @@ let BrowserOnClick = {
        // we can fetch a site-specific report, for phishing, we redirect
        // to the generic page describing phishing protection.

        // We log even if malware/phishing info URL couldn't be found: 
        // the measurement is for how many users clicked the WHY BLOCKED button
        secHistogram.add(nsISecTel[bucketName + "WHY_BLOCKED"]);

        if (isMalware) {
          // Get the stop badware "why is this blocked" report url,
          // append the current url, and go there.
@@ -2589,6 +2613,7 @@ let BrowserOnClick = {
        break;

      case "ignoreWarningButton":
        secHistogram.add(nsISecTel[bucketName + "IGNORE_WARNING"]);
        this.ignoreWarningButton(isMalware);
        break;
    }
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ function test() {
var tests = {
  testProfileSet: function(next) {
    let profile = {
      portrait: "chrome://branding/content/icon48.png",
      portrait: "https://example.com/portrait.jpg",
      userName: "trickster",
      displayName: "Kuma Lisa",
      profileURL: "http://en.wikipedia.org/wiki/Kuma_Lisa"
@@ -31,7 +31,7 @@ var tests = {
    Social.provider.updateUserProfile(profile);
    // check dom values
    let portrait = document.getElementById("social-statusarea-user-portrait").getAttribute("src");
    is(portrait, profile.portrait, "portrait is set");
    is(profile.portrait, portrait, "portrait is set");
    let userButton = document.getElementById("social-statusarea-username");
    ok(!userButton.hidden, "username is visible");
    is(userButton.label, profile.userName, "username is set");
Loading