зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631806 - [part 1] Update perftests to use new API and fix `--proxy` option; r=tarek
This patch fixes the tests in testing/performance/ that hadn't been updated to the new API, as well as fixing a couple issues with the `--proxy` option: * `policy.json` wasn't being logged correctly, since mozlog was treating the data as a format string * Proxy prefs weren't being set correctly for the profile Differential Revision: https://phabricator.services.mozilla.com/D79937
This commit is contained in:
Родитель
561f0ff278
Коммит
c9a16c40ed
|
@ -55,11 +55,7 @@ class ProxyRunner(Layer):
|
|||
prefs["network.proxy.ssl_port"] = port
|
||||
prefs["network.proxy.no_proxies_on"] = "localhost"
|
||||
browser_prefs = metadata.get_options("browser_prefs")
|
||||
if "prefs" in browser_prefs:
|
||||
browser_prefs["prefs"].update(prefs)
|
||||
else:
|
||||
browser_prefs["prefs"] = prefs
|
||||
metadata.update_options("browser_prefs", browser_prefs)
|
||||
browser_prefs.update(prefs)
|
||||
|
||||
return metadata
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
let rootUrl = "https://www.bbc.com/";
|
||||
|
||||
await commands.navigate(rootUrl);
|
||||
|
@ -14,4 +14,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "BBC Link",
|
||||
description: "Measures time to load BBC homepage",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
await commands.navigate("https://www.example.com");
|
||||
await commands.wait.byTime(15000);
|
||||
|
||||
|
@ -37,4 +37,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement before the next page we want to measure
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "Facebook",
|
||||
description: "Measures time to log in to Facebook",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
let rootUrl = "https://2019.jsconf.eu/";
|
||||
|
||||
await commands.navigate(rootUrl);
|
||||
|
@ -14,4 +14,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "JSConf (cold)",
|
||||
description: "Measures time to load JSConf page (cold)",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
let rootUrl = "https://2019.jsconf.eu/";
|
||||
|
||||
await commands.navigate(rootUrl);
|
||||
|
@ -20,4 +20,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "JSConf (warm)",
|
||||
description: "Measures time to load JSConf page (warm)",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
let rootUrl = "https://www.politico.com/";
|
||||
|
||||
await commands.navigate(rootUrl);
|
||||
|
@ -14,4 +14,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "Politico Link",
|
||||
description: "Measures time to load Politico homepage",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function(context, commands) {
|
||||
async function test(context, commands) {
|
||||
let rootUrl = "https://www.politico.com/";
|
||||
|
||||
await commands.navigate(rootUrl);
|
||||
|
@ -14,4 +14,11 @@ module.exports = async function(context, commands) {
|
|||
|
||||
// Stop and collect the measurement
|
||||
await commands.measure.stop();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
owner: "Performance Team",
|
||||
name: "YouTube Link",
|
||||
description: "Measures time to load YouTube video",
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче