Bug 1374333 - Use TalosParentProfiler to fix profiling in damp tests. r?rwood draft
authorMike Conley <mconley@mozilla.com>
Tue, 11 Jul 2017 17:16:40 -0400
changeset 610831 f17270402b70358d405639fe10790075592e3d63
parent 610830 1d3cb729a4f675f236650c30775babda05aa9572
child 610832 64cadf0d1d5234f8ce9357fe2be49493565ded5e
push id69002
push usermconley@mozilla.com
push dateTue, 18 Jul 2017 19:11:35 +0000
reviewersrwood
bugs1374333
milestone56.0a1
Bug 1374333 - Use TalosParentProfiler to fix profiling in damp tests. r?rwood MozReview-Commit-ID: 6soeiMl2NXx
testing/talos/talos/tests/devtools/addon/content/damp.js
testing/talos/talos/tests/devtools/addon/content/damp.overlay.xul
--- a/testing/talos/talos/tests/devtools/addon/content/damp.js
+++ b/testing/talos/talos/tests/devtools/addon/content/damp.js
@@ -491,28 +491,28 @@ Damp.prototype = {
 
       window.on(EVENTS.NETWORK_EVENT, onRequest);
       window.on(EVENTS.RECEIVED_EVENT_TIMINGS, onTimings);
     });
   },
 
   startTest(doneCallback, config) {
     this._onTestComplete = function(results) {
-      Profiler.mark("DAMP - end", true);
+      TalosParentProfiler.pause("DAMP - end");
       doneCallback(results);
     };
     this._config = config;
 
     const Ci = Components.interfaces;
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
     this._win = wm.getMostRecentWindow("navigator:browser");
     this._dampTab = this._win.gBrowser.selectedTab;
     this._win.gBrowser.selectedBrowser.focus(); // Unfocus the URL bar to avoid caret blink
 
-    Profiler.mark("DAMP - start", true);
+    TalosParentProfiler.resume("DAMP - start");
 
     let tests = [];
     tests = tests.concat(this._getToolLoadingTests(SIMPLE_URL, "simple"));
     tests = tests.concat(this._getToolLoadingTests(COMPLICATED_URL, "complicated"));
 
     if (config.subtests.indexOf("consoleBulkLogging") > -1) {
       tests = tests.concat(this._consoleBulkLoggingTest);
     }
--- a/testing/talos/talos/tests/devtools/addon/content/damp.overlay.xul
+++ b/testing/talos/talos/tests/devtools/addon/content/damp.overlay.xul
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <overlay id="Scrapper-Overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-<script type="application/x-javascript" src="Profiler.js" />
+<script type="application/x-javascript" src="chrome://talos-powers-content/content/TalosParentProfiler.js" />
 <script type="application/x-javascript" src="damp.js" />
 <script type="application/x-javascript">
 
 (function(){
   const Cc = Components.classes;
   const Ci = Components.interfaces;
   var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);