Commit 2170492c authored by Coroiu Cristina's avatar Coroiu Cristina
Browse files

Merge mozilla-central to inbound a=merge

parents 7b6ebf83 4436573f
Loading
Loading
Loading
Loading
+0 −41
Original line number Diff line number Diff line
@@ -77,47 +77,6 @@ function testText(aIDs, aStartOffset, aEndOffset, aText, aTodoFlag) {
  }
}

/**
 * Test password text between two given offsets
 *
 * @param aIDs          [in] an array of accessible IDs to test
 * @param aStartOffset  [in] the start offset within the text to test
 * @param aEndOffset    [in] the end offset up to which the text is tested
 * @param aText         [in] the expected result from the test
 *
 * @note  All this function does is test that getText doe snot expose the
 *        password text itself, but something else.
 */
function testPasswordText(aIDs, aStartOffset, aEndOffset, aText) {
  for (var i = 0; i < aIDs.length; i++) {
    var acc = getAccessible(aIDs[i], nsIAccessibleText);
    try {
      isnot(
        acc.getText(aStartOffset, aEndOffset),
        aText,
        "getText: plain text between start and end offsets '" +
          aStartOffset +
          "', '" +
          aEndOffset +
          " for '" +
          prettyName(aIDs[i]) +
          "'"
      );
    } catch (e) {
      ok(
        false,
        "getText fails between start and end offsets '" +
          aStartOffset +
          "', '" +
          aEndOffset +
          " for '" +
          prettyName(aIDs[i]) +
          "'"
      );
    }
  }
}

/**
 * Test getTextAtOffset for BOUNDARY_CHAR over different elements.
 *
+15 −1
Original line number Diff line number Diff line
@@ -29,7 +29,21 @@

      IDs = [ "password" ];
      testCharacterCount(IDs, 4);
      testPasswordText(IDs, 0, 4, "test");
      let password = document.getElementById("password");
      let editor = SpecialPowers.wrap(password).editor;
      let passwordMask = editor.passwordMask;
      testText(IDs, 0, 4, `${passwordMask}${passwordMask}${passwordMask}${passwordMask}`);
      // a11y data is updated at next tick so that we need to refresh here.
      editor.unmask(0, 2);
      SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
      testText(IDs, 0, 4, `te${passwordMask}${passwordMask}`);
      editor.unmask(2, 4);
      SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
      testText(IDs, 0, 4, `${passwordMask}${passwordMask}st`);
      editor.unmask(0, 4);
      SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(0);
      testText(IDs, 0, 4, `test`);
      SpecialPowers.DOMWindowUtils.restoreNormalRefresh();

      SimpleTest.finish();
    }
+6 −0
Original line number Diff line number Diff line
@@ -1035,6 +1035,12 @@ nsContextMenu.prototype = {
    this.showItem("fill-login-generated-password", canFillGeneratedPassword);
    this.showItem("generated-password-separator", canFillGeneratedPassword);

    this.setItemAttr(
      "fill-login-generated-password",
      "disabled",
      PrivateBrowsingUtils.isWindowPrivate(window)
    );

    if (!fragment) {
      return;
    }
+1 −2
Original line number Diff line number Diff line
@@ -65,8 +65,7 @@ def phc_default(milestone, target, replace_malloc_default, replace_malloc):
            target.bitness == 64)


# XXX: disabled for now
option('--enable-phc', env='MOZ_PHC', default=False,
option('--enable-phc', env='MOZ_PHC', default=phc_default,
       when='--enable-jemalloc',
       help='{Enable|Disable} PHC (Probabilistic Memory Checker). '
            'Also enables replace-malloc and frame pointers')
+1 −2
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@ const { getComputedStyle } = require("./markup");
// This canvas size value is the safest we can use because most GPUs can handle it.
// It's also far from the maximum canvas memory allocation limit (4096x4096x4 is
// 67.108.864 bytes, where the limit is 500.000.000 bytes, see
// gfx_max_alloc_size_do_not_use_directly in:
// modules/libpref/init/StaticPrefList.h.
// gfx_max_alloc_size in modules/libpref/init/StaticPrefList.yaml.
//
// Note:
// Once bug 1232491 lands, we could try to refactor this code to use the values from
Loading