Bug 1458375 - Make cpstartup Talos test load the target over http:// rather than chrome://. r?rwood draft
authorMike Conley <mconley@mozilla.com>
Mon, 07 May 2018 15:11:12 -0400
changeset 792161 7433e1d913229738bd56891db88d587875bcd936
parent 792160 93bef3333002397901a08ca879361d4b52947b33
push id109015
push usermconley@mozilla.com
push dateMon, 07 May 2018 19:11:58 +0000
reviewersrwood
bugs1458375
milestone61.0a1
Bug 1458375 - Make cpstartup Talos test load the target over http:// rather than chrome://. r?rwood MozReview-Commit-ID: 6XDV2a6bGEG
testing/talos/talos/test.py
testing/talos/talos/tests/cpstartup/bootstrap.js
--- a/testing/talos/talos/test.py
+++ b/testing/talos/talos/test.py
@@ -299,16 +299,17 @@ class cpstartup(PageloaderTest):
     """
     extensions = ['${talos}/tests/cpstartup', '${talos}/pageloader']
     tpmanifest = '${talos}/tests/cpstartup/cpstartup.manifest'
     tppagecycles = 20
     gecko_profile_entries = 1000000
     tploadnocache = True
     unit = 'ms'
     preferences = {
+        'addon.test.cpstartup.webserver': '${webserver}',
         # By default, Talos is configured to open links from
         # content in new windows. We're overriding them so that
         # they open in new tabs instead.
         # See http://kb.mozillazine.org/Browser.link.open_newwindow
         # and http://kb.mozillazine.org/Browser.link.open_newwindow.restriction
         'browser.link.open_newwindow': 3,
         'browser.link.open_newwindow.restriction': 2,
     }
--- a/testing/talos/talos/tests/cpstartup/bootstrap.js
+++ b/testing/talos/talos/tests/cpstartup/bootstrap.js
@@ -1,17 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const PREALLOCATED_PREF = "dom.ipc.processPrelaunch.enabled";
 
-const TARGET_URI = "chrome://cpstartup/content/target.html";
+const TARGET_PATH = "tests/cpstartup/content/target.html";
+const WEBSERVER = Services.prefs.getCharPref("addon.test.cpstartup.webserver");
+const TARGET_URI = `${WEBSERVER}/${TARGET_PATH}`;
 
 /**
  * The purpose of this test it to measure the performance of a content process startup.
  *
  * In practice it measures a bit more than the content process startup. First the parent
  * process starts the clock and requests a new tab with a simple page and then the child
  * stops the clock in the frame script that will be able to process the URL to handle.
  * So it does measure a few things pre process creation (browser element and tab creation