Request selected layout styles before common CSS blocks the bootstrap

This commit is contained in:
Jonathan Sykes
2026-10-08 03:50:57 +08:00
parent 524a7b7f1d
commit 40b92ebc0d
2 changed files with 3 additions and 2 deletions

View File

@@ -75,6 +75,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.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);
});