mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
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:
parent
1e2da20ce2
commit
a1f1d61928
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
about:newtab
|
||||
about:home
|
||||
about:newtab
|
||||
about:home
|
||||
about:newtab
|
||||
about:home
|
1
testing/talos/talos/tests/about-newtab/snippets.json
Normal file
1
testing/talos/talos/tests/about-newtab/snippets.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user