blob: efe7982cfe7da5c9f5bfa6527f0397ae62320fda [file] [log] [blame]
function setEnableFeature(enable, completionHandler) {
if (typeof completionHandler !== "function")
testFailed("setEnableFeature() requires a completion handler function.");
if (enable) {
internals.setResourceLoadStatisticsEnabled(true);
testRunner.setStatisticsIsRunningTest(true);
completionHandler();
} else {
testRunner.statisticsResetToConsistentState(function() {
testRunner.setStatisticsIsRunningTest(false);
internals.setResourceLoadStatisticsEnabled(false);
testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(false);
completionHandler();
});
}
}