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'.

--HG--
extra : rebase_source : e1d0547e5d3125e9db44bb47ddfff3b4f8d50e99
extra : source : 73fb13743a74a5a920d099fda70d9b1a1fa3a6ed
This commit is contained in:
Botond Ballo 2015-07-08 19:18:28 -04:00
Родитель f2e8a59818
Коммит 2f7c3135ad
6 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -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() {
w = window.open("helper_bug1151663.html", "_blank");
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
w = window.open("helper_bug1151663.html", "_blank");
});
};
function finishTest() {

Просмотреть файл

@ -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() {
w = window.open("helper_bug982141.html", "_blank");
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
w = window.open("helper_bug982141.html", "_blank");
});
};
function finishTest() {

Просмотреть файл

@ -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);
});

Просмотреть файл

@ -231,9 +231,14 @@ 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;
mApzTestData.StartNewPaint(mPaintSequenceNumber);
if (gfxPrefs::APZTestLoggingEnabled()) {
mApzTestData.StartNewPaint(mPaintSequenceNumber);
}
}
}

Просмотреть файл

@ -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);

Просмотреть файл

@ -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");