Bug 1374333 - Use TalosContentProfiler to fix profiling in tpaint tests. r?rwood draft
authorMike Conley <mconley@mozilla.com>
Tue, 11 Jul 2017 17:39:40 -0400
changeset 610834 f316d6d6cec3689cc1c3240cac2aae9b3372f945
parent 610833 40a5ea92819b1753fcc7a5d05d66658760a46e05
child 610835 d7ceacfc4479ea2b50a4dab44cdc63ee1af64e0c
push id69002
push usermconley@mozilla.com
push dateTue, 18 Jul 2017 19:11:35 +0000
reviewersrwood
bugs1374333
milestone56.0a1
Bug 1374333 - Use TalosContentProfiler to fix profiling in tpaint tests. r?rwood MozReview-Commit-ID: FPHZr3tFCEj
testing/talos/talos/tests/tpaint/tpaint.html
--- 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() {" +