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