Bug 1374333 - Use TalosContentProfiler to fix profiling in tpaint tests. r?rwood
MozReview-Commit-ID: FPHZr3tFCEj
--- a/testing/talos/talos/tests/tpaint/tpaint.html
+++ b/testing/talos/talos/tests/tpaint/tpaint.html
@@ -15,18 +15,17 @@ var auto = document.location.search.spli
*
* XXX When run manually, outside of automation, need to:
* 1) allow popups
* 2) set dom.send_after_paint_to_content = true
* 3) set browser.link.open_newwindow = 2 (else it opens in a tab)
*/
async function startTest() {
- TalosContentProfiler.initFromURLQueryParams(location.search);
- await TalosContentProfiler.beginTest("tpaint");
+ await TalosContentProfiler.resume("tpaint", true);
scheduleNextWindow();
}
function scheduleNextWindow() {
TalosPowersContent.forceCCAndGC();
window.setTimeout(openWindow, OPENER_DELAY);
}
@@ -37,30 +36,28 @@ function calcMedian( numbers ) {
var n = Math.floor( sortedNumbers.length / 2 );
if (sortedNumbers.length % 2) {
return sortedNumbers[n];
}
return ( sortedNumbers[n - 1] + sortedNumbers[n] ) / 2;
}
async function reportTimes() {
- await TalosContentProfiler.finishTest();
-
if (window.tpRecordTime)
window.tpRecordTime(openTime);
if (auto) {
dumpLog("openingTime=" + openTime + "\n");
}
}
async function childIsOpen() {
kidEndTime = window.performance.now();
openTime = kidEndTime - kidStartTime;
- await TalosContentProfiler.pause("tpaint");
+ await TalosContentProfiler.pause("tpaint", true);
window.setTimeout(reportTimes, 0);
}
/* eslint-disable no-useless-concat */
var kidHTML = "<html><meta charset='utf-8'><script>" +
"var e = 'MozAfterPaint';" +
"function done() {" +