Bug 1459774 - Make cpstartup Talos test load the target over http:// rather than chrome://. r=rwood
MozReview-Commit-ID: 6XDV2a6bGEG
--- 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