Commit 6754ccc0 authored by Phil Ringnalda's avatar Phil Ringnalda
Browse files

Merge m-c to b-i

parents 6ee2963e 3d59a28e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -996,6 +996,9 @@ pref("gfx.canvas.max-size-for-skia-gl", -1);
// enable fence with readpixels for SurfaceStream
pref("gfx.gralloc.fence-with-readpixels", true);

// enable screen mirroring to external display
pref("gfx.screen-mirroring.enabled", true);

// The url of the page used to display network error details.
pref("b2g.neterror.url", "net_error.html");

+0 −4
Original line number Diff line number Diff line
@@ -454,11 +454,7 @@ pref("browser.tabs.drawInTitlebar", true);
// false  return to the adjacent tab (old default)
pref("browser.tabs.selectOwnerOnClose", true);

#ifdef RELEASE_BUILD
pref("browser.tabs.showAudioPlayingIcon", false);
#else
pref("browser.tabs.showAudioPlayingIcon", true);
#endif

pref("browser.ctrlTab.previews", false);

+1 −1
Original line number Diff line number Diff line
@@ -576,7 +576,7 @@ toolbarbutton.bookmark-item {

/* Apply crisp rendering for favicons at exactly 2dppx resolution */
@media (resolution: 2dppx) {
  .alltabs-popup > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon,
  #alltabs-popup > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon,
  .menuitem-with-favicon > .menu-iconic-left > .menu-iconic-icon {
    image-rendering: -moz-crisp-edges;
  }
+33 −4
Original line number Diff line number Diff line
@@ -24,6 +24,19 @@ const PREF_ACCEPTED_POLICY_DATE = PREF_BRANCH + "dataSubmissionPolicyNotifiedTim

const TEST_POLICY_VERSION = 37;

function fakeShowPolicyTimeout(set, clear) {
  let reportingPolicy =
    Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm", {}).Policy;
  reportingPolicy.setShowInfobarTimeout = set;
  reportingPolicy.clearShowInfobarTimeout = clear;
}

function sendSessionRestoredNotification() {
  let reportingPolicyImpl =
    Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm", {}).TelemetryReportingPolicyImpl;
  reportingPolicyImpl.observe(null, "sessionstore-windows-restored", null);
}

/**
 * Wait for a tick.
 */
@@ -56,6 +69,21 @@ function promiseWaitForNotificationClose(aNotification) {
  return deferred.promise;
}

function triggerInfoBar(expectedTimeoutMs) {
  let showInfobarCallback = null;
  let timeoutMs = null;
  fakeShowPolicyTimeout((callback, timeout) => {
    showInfobarCallback = callback;
    timeoutMs = timeout;
  }, () => {});
  sendSessionRestoredNotification();
  Assert.ok(!!showInfobarCallback, "Must have a timer callback.");
  if (expectedTimeoutMs !== undefined) {
    Assert.equal(timeoutMs, expectedTimeoutMs, "Timeout should match");
  }
  showInfobarCallback();
}

let checkInfobarButton = Task.async(function* (aNotification) {
  // Check that the button on the data choices infobar does the right thing.
  let buttons = aNotification.getElementsByTagName("button");
@@ -130,11 +158,11 @@ add_task(function* test_single_window(){
            "User not notified about datareporting policy.");

  let alertShownPromise = promiseWaitForAlertActive(notificationBox);
  // This should be false and trigger the Infobar.
  Assert.ok(!TelemetryReportingPolicy.canUpload(),
            "User should not be allowed to upload and the infobar should be triggered.");
            "User should not be allowed to upload.");

  // Wait for the infobar to be displayed.
  triggerInfoBar(10 * 1000);
  yield alertShownPromise;

  Assert.equal(notificationBox.allNotifications.length, 1, "Notification Displayed.");
@@ -185,10 +213,11 @@ add_task(function* test_multiple_windows(){
    promiseWaitForAlertActive(notificationBoxes[1])
  ];

  // This should be false and trigger the Infobar.
  Assert.ok(!TelemetryReportingPolicy.canUpload(),
            "User should not be allowed to upload and the infobar should be triggered.");
            "User should not be allowed to upload.");

  // Wait for the infobars.
  triggerInfoBar(10 * 1000);
  yield Promise.all(showAlertPromises);

  // Both notification were displayed. Close one and check that both gets closed.
+3 −0
Original line number Diff line number Diff line
@@ -5,10 +5,13 @@ const TEST_ENGINE_BASENAME = "searchSuggestionEngine.xml";

// Must run first.
add_task(function* prepare() {
  // The test makes only sense if unified complete is enabled.
  Services.prefs.setBoolPref("browser.urlbar.unifiedcomplete", true);
  let engine = yield promiseNewSearchEngine(TEST_ENGINE_BASENAME);
  let oldCurrentEngine = Services.search.currentEngine;
  Services.search.currentEngine = engine;
  registerCleanupFunction(function () {
    Services.prefs.clearUserPref("browser.urlbar.unifiedcomplete");
    Services.search.currentEngine = oldCurrentEngine;
    Services.prefs.clearUserPref(SUGGEST_ALL_PREF);
    Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
Loading