Bug 1600339 - Measure responsiveness while evaluating messages r=k88hudson,mconley

Differential Revision: https://phabricator.services.mozilla.com/D59535

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrei Oprea 2020-01-18 21:08:40 +00:00
parent 1e2da20ce2
commit a1f1d61928
6 changed files with 49 additions and 1 deletions

View File

@ -162,6 +162,7 @@ _OPT\.OBJ/
^testing/talos/talos/tests/devtools/damp.manifest.develop
^testing/talos/talos/startup_test/startup_about_home_paint/startup_about_home_paint.manifest.develop
^testing/talos/talos/webextensions/
^testing/talos/talos/tests/about-newtab/about_newtab.manifest.develop
^talos-venv
^py3venv
^testing/talos/talos/mitmproxy/mitmdump

View File

@ -134,6 +134,19 @@ const MessageLoaderUtils = {
return provider.messages;
},
async _localJsonLoader(provider) {
let payload;
try {
payload = await (await fetch(provider.location, {
credentials: "omit",
})).json();
} catch (e) {
return [];
}
return payload.messages;
},
async _remoteLoaderCache(storage) {
let allCached;
try {
@ -344,6 +357,8 @@ const MessageLoaderUtils = {
return this._remoteLoader;
case "remote-settings":
return this._remoteSettingsLoader;
case "json":
return this._localJsonLoader;
case "local":
default:
return this._localLoader;

View File

@ -4,7 +4,7 @@
"tests": ["basic_compositor_video"]
},
"chromez": {
"tests": ["about_preferences_basic", "tresize"]
"tests": ["about_preferences_basic", "tresize", "about_newtab_with_snippets"]
},
"dromaeojs": {
"tests": ["dromaeo_css", "kraken"]

View File

@ -1010,3 +1010,28 @@ class about_preferences_basic(PageloaderTest):
unit = 'ms'
lower_is_better = True
fnbpaint = True
@register_test()
class about_newtab_with_snippets(PageloaderTest):
"""
Load about ActivityStream (about:home and about:newtab) with snippets enabled
"""
tpmanifest = '${talos}/tests/about-newtab/about_newtab.manifest'
tpcycles = 25
tppagecycles = 1
responsiveness = True
gecko_profile_interval = 1
gecko_profile_entries = 2000000
filters = filter.ignore_first.prepare(5) + filter.median.prepare()
unit = 'ms'
lower_is_better = True
fnbpaint = True
preferences = {
# ensure that snippets are turned on and load the json messages
'browser.newtabpage.activity-stream.asrouter.providers.snippets':\
'{"id":"snippets","enabled":true,"type":"json","location":\
"http://fakedomain/tests/about-newtab/snippets.json",\
"updateCycleInMs":14400000}',
'browser.newtabpage.activity-stream.feeds.snippets': True
}

View File

@ -0,0 +1,6 @@
about:newtab
about:home
about:newtab
about:home
about:newtab
about:home

File diff suppressed because one or more lines are too long