Bug 1177018 - Only enable APZ test logging for tests that actually use it. r=kats

This avoids excessive amounts of test data accumulating which can slow tests down.

As part of this change, the pref for enabling the logging was made 'Live'.
This commit is contained in:
Botond Ballo 2015-07-08 19:18:28 -04:00
parent dac74f027b
commit 59c1b8cfcf
6 changed files with 18 additions and 9 deletions

View File

@ -17,7 +17,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663
// inside an iframe which means we have no control over the root APZC.
var w = null;
window.onload = function() {
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
w = window.open("helper_bug1151663.html", "_blank");
});
};
function finishTest() {

View File

@ -17,7 +17,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=982141
// inside an iframe which means we have no control over the root APZC.
var w = null;
window.onload = function() {
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
w = window.open("helper_bug982141.html", "_blank");
});
};
function finishTest() {

View File

@ -154,7 +154,10 @@ SimpleTest.waitForExplicitFinish();
// Disable smooth scrolling, because it results in long-running scroll
// animations that can result in a 'scroll' event triggered by an earlier
// wheel event as corresponding to a later wheel event.
SpecialPowers.pushPrefEnv({"set": [["general.smoothScroll", false]]},
// Also enable APZ test logging, since we use that data to determine whether
// a scroll frame was layerized.
SpecialPowers.pushPrefEnv({"set": [["general.smoothScroll", false],
["apz.test.logging_enabled", true]]},
function() {
SimpleTest.waitForFocus(startTest, window);
});

View File

@ -231,10 +231,15 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
}
// If this is a new paint, increment the paint sequence number.
if (!mIsRepeatTransaction && gfxPrefs::APZTestLoggingEnabled()) {
if (!mIsRepeatTransaction) {
// Increment the paint sequence number even if test logging isn't
// enabled in this process; it may be enabled in the parent process,
// and the parent process expects unique sequence numbers.
++mPaintSequenceNumber;
if (gfxPrefs::APZTestLoggingEnabled()) {
mApzTestData.StartNewPaint(mPaintSequenceNumber);
}
}
}
void

View File

@ -176,7 +176,7 @@ private:
DECL_GFX_PREF(Live, "apz.pan_repaint_interval", APZPanRepaintInterval, int32_t, 250);
DECL_GFX_PREF(Live, "apz.printtree", APZPrintTree, bool, false);
DECL_GFX_PREF(Live, "apz.smooth_scroll_repaint_interval", APZSmoothScrollRepaintInterval, int32_t, 75);
DECL_GFX_PREF(Once, "apz.test.logging_enabled", APZTestLoggingEnabled, bool, false);
DECL_GFX_PREF(Live, "apz.test.logging_enabled", APZTestLoggingEnabled, bool, false);
DECL_GFX_PREF(Live, "apz.touch_start_tolerance", APZTouchStartTolerance, float, 1.0f/4.5f);
DECL_GFX_PREF(Live, "apz.use_paint_duration", APZUsePaintDuration, bool, true);
DECL_GFX_PREF(Live, "apz.velocity_bias", APZVelocityBias, float, 1.0f);

View File

@ -252,9 +252,6 @@ user_pref("identity.fxaccounts.remote.signin.uri", "https://%(server)s/fxa-signi
user_pref("identity.fxaccounts.settings.uri", "https://%(server)s/fxa-settings");
user_pref('identity.fxaccounts.remote.webchannel.uri', 'https://%(server)s/');
// Enable logging of APZ test data (see bug 961289).
user_pref('apz.test.logging_enabled', true);
// Make sure SSL Error reports don't hit the network
user_pref("security.ssl.errorReporting.url", "https://example.com/browser/browser/base/content/test/general/pinning_reports.sjs?succeed");