Start font preloads before the layout bootstrap
This commit is contained in:
@@ -76,6 +76,7 @@ test('only core scripts and styles remain eager; native fallback and active layo
|
||||
assert.ok(html.indexOf('id="ytp-assets"')<html.indexOf('src="lazy.js"'));
|
||||
assert.ok(html.indexOf('src="lazy.js"')<html.indexOf('</head>'));
|
||||
assert.ok(html.indexOf('src="lazy.js"')<html.indexOf('rel="stylesheet"'),'head bootstrap must not wait for common CSS before requesting the selected layout');
|
||||
assert.ok(html.indexOf('rel="preload"')<html.indexOf('src="lazy.js"'),'font preloads must start before the render-blocking bootstrap');
|
||||
assert.deepEqual(JSON.parse(html.match(/id="ytp-assets">([^<]+)<\/script>/)[1]).groups,groups);
|
||||
for(const name of ['playlist','settings','service-mode','lyrics-editor'])assert.ok(groups['feature:'+name].eager);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user