(async function(/** @type {import('test_runner').TestRunner} */ testRunner) {
var page = await testRunner.createPage();
await page.loadHTML(`
<html>
<meta charset="UTF-8">
<style>
@font-face {
font-family: has_male_female_sign;
src: url("../../third_party/Libertine/LinLibertine_R.woff");
}
@font-face {
font-family: noto_color_emoji;
src: url("../../third_party/NotoColorEmoji/NotoColorEmoji.ttf");
}
#emoji_male_female_zwj_sequences {
font-family: has_male_female_sign, noto_color_emoji;
}
</style>
<body>
<div class="test">
<div id="emoji_male_female_zwj_sequences">๐ฎโโ๏ธ๐ฎโโ๏ธ๐ฎ๐ปโโ๏ธ๐ฎ๐ปโโ๏ธ๐ฎ๐ผโโ๏ธ๐ฎ๐ผโโ๏ธ๐ฎ๐ฝโโ๏ธ๐ฎ๐ฝโโ๏ธ๐ฎ๐พโโ๏ธ๐ฎ๐พโโ๏ธ๐ฎ๐ฟโโ๏ธ๐ฎ๐ฟโโ๏ธ๐ฑโโ๏ธ๐ฑโโ๏ธ๐ฑ๐ปโโ๏ธ๐ฑ๐ปโโ๏ธ๐ฑ๐ผโโ๏ธ๐ฑ๐ผโโ๏ธ๐ฑ๐ฝโโ๏ธ๐ฑ๐ฝโโ๏ธ๐ฑ๐พโโ๏ธ๐ฑ๐พโโ๏ธ๐ฑ๐ฟโโ๏ธ๐ฑ๐ฟโโ๏ธ๐ณโโ๏ธ๐ณโโ๏ธ๐ณ๐ปโโ๏ธ๐ณ๐ปโโ๏ธ๐ณ๐ผโโ๏ธ๐ณ๐ผโโ๏ธ๐ณ๐ฝโโ๏ธ๐ณ๐ฝโโ๏ธ๐ณ๐พโโ๏ธ๐ณ๐พโโ๏ธ๐ณ๐ฟโโ๏ธ๐ณ๐ฟโโ๏ธ๐ทโโ๏ธ๐ทโโ๏ธ๐ท๐ปโโ๏ธ๐ท๐ปโโ๏ธ๐ท๐ผโโ๏ธ๐ท๐ผโโ๏ธ๐ท๐ฝโโ๏ธ๐ท๐ฝโโ๏ธ๐ท๐พโโ๏ธ๐ท๐พโโ๏ธ๐ท๐ฟโโ๏ธ๐ท๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐ต๐ปโโ๏ธ๐ต๐ปโโ๏ธ๐ต๐ผโโ๏ธ๐ต๐ผโโ๏ธ๐ต๐ฝโโ๏ธ๐ต๐ฝโโ๏ธ๐ต๐พโโ๏ธ๐ต๐พโโ๏ธ๐ต๐ฟโโ๏ธ๐ต๐ฟโโ๏ธ๐ต๏ธโโ๏ธ๐ต๏ธโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐งโโ๏ธโน๐ปโโ๏ธโน๐ปโโ๏ธโน๐ผโโ๏ธโน๐ผโโ๏ธโน๐ฝโโ๏ธโน๐ฝโโ๏ธโน๐พโโ๏ธโน๐พโโ๏ธโน๐ฟโโ๏ธโน๐ฟโโ๏ธโน๏ธโโ๏ธโน๏ธโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐๏ธโโ๏ธ๐๏ธโโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐๏ธโโ๏ธ๐๏ธโโ๏ธ๐ฏโโ๏ธ๐ฏโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐ฃโโ๏ธ๐ฃโโ๏ธ๐ฃ๐ปโโ๏ธ๐ฃ๐ปโโ๏ธ๐ฃ๐ผโโ๏ธ๐ฃ๐ผโโ๏ธ๐ฃ๐ฝโโ๏ธ๐ฃ๐ฝโโ๏ธ๐ฃ๐พโโ๏ธ๐ฃ๐พโโ๏ธ๐ฃ๐ฟโโ๏ธ๐ฃ๐ฟโโ๏ธ๐ดโโ๏ธ๐ดโโ๏ธ๐ด๐ปโโ๏ธ๐ด๐ปโโ๏ธ๐ด๐ผโโ๏ธ๐ด๐ผโโ๏ธ๐ด๐ฝโโ๏ธ๐ด๐ฝโโ๏ธ๐ด๐พโโ๏ธ๐ด๐พโโ๏ธ๐ด๐ฟโโ๏ธ๐ด๐ฟโโ๏ธ๐ตโโ๏ธ๐ตโโ๏ธ๐ต๐ปโโ๏ธ๐ต๐ปโโ๏ธ๐ต๐ผโโ๏ธ๐ต๐ผโโ๏ธ๐ต๐ฝโโ๏ธ๐ต๐ฝโโ๏ธ๐ต๐พโโ๏ธ๐ต๐พโโ๏ธ๐ต๐ฟโโ๏ธ๐ต๐ฟโโ๏ธ๐ถโโ๏ธ๐ถโโ๏ธ๐ถ๐ปโโ๏ธ๐ถ๐ปโโ๏ธ๐ถ๐ผโโ๏ธ๐ถ๐ผโโ๏ธ๐ถ๐ฝโโ๏ธ๐ถ๐ฝโโ๏ธ๐ถ๐พโโ๏ธ๐ถ๐พโโ๏ธ๐ถ๐ฟโโ๏ธ๐ถ๐ฟโโ๏ธ๐คธโโ๏ธ๐คธโโ๏ธ๐คธ๐ปโโ๏ธ๐คธ๐ปโโ๏ธ๐คธ๐ผโโ๏ธ๐คธ๐ผโโ๏ธ๐คธ๐ฝโโ๏ธ๐คธ๐ฝโโ๏ธ๐คธ๐พโโ๏ธ๐คธ๐พโโ๏ธ๐คธ๐ฟโโ๏ธ๐คธ๐ฟโโ๏ธ๐คนโโ๏ธ๐คนโโ๏ธ๐คน๐ปโโ๏ธ๐คน๐ปโโ๏ธ๐คน๐ผโโ๏ธ๐คน๐ผโโ๏ธ๐คน๐ฝโโ๏ธ๐คน๐ฝโโ๏ธ๐คน๐พโโ๏ธ๐คน๐พโโ๏ธ๐คน๐ฟโโ๏ธ๐คน๐ฟโโ๏ธ๐คผโโ๏ธ๐คผโโ๏ธ๐คฝโโ๏ธ๐คฝโโ๏ธ๐คฝ๐ปโโ๏ธ๐คฝ๐ปโโ๏ธ๐คฝ๐ผโโ๏ธ๐คฝ๐ผโโ๏ธ๐คฝ๐ฝโโ๏ธ๐คฝ๐ฝโโ๏ธ๐คฝ๐พโโ๏ธ๐คฝ๐พโโ๏ธ๐คฝ๐ฟโโ๏ธ๐คฝ๐ฟโโ๏ธ๐คพโโ๏ธ๐คพโโ๏ธ๐คพ๐ปโโ๏ธ๐คพ๐ปโโ๏ธ๐คพ๐ผโโ๏ธ๐คพ๐ผโโ๏ธ๐คพ๐ฝโโ๏ธ๐คพ๐ฝโโ๏ธ๐คพ๐พโโ๏ธ๐คพ๐พโโ๏ธ๐คพ๐ฟโโ๏ธ๐คพ๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐งโโ๏ธ๐งโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ปโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ผโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐ฝโโ๏ธ๐ง๐พโโ๏ธ๐ง๐พโโ๏ธ๐ง๐ฟโโ๏ธ๐ง๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐
โโ๏ธ๐
โโ๏ธ๐
๐ปโโ๏ธ๐
๐ปโโ๏ธ๐
๐ผโโ๏ธ๐
๐ผโโ๏ธ๐
๐ฝโโ๏ธ๐
๐ฝโโ๏ธ๐
๐พโโ๏ธ๐
๐พโโ๏ธ๐
๐ฟโโ๏ธ๐
๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐โโ๏ธ๐โโ๏ธ๐๐ปโโ๏ธ๐๐ปโโ๏ธ๐๐ผโโ๏ธ๐๐ผโโ๏ธ๐๐ฝโโ๏ธ๐๐ฝโโ๏ธ๐๐พโโ๏ธ๐๐พโโ๏ธ๐๐ฟโโ๏ธ๐๐ฟโโ๏ธ๐คฆโโ๏ธ๐คฆโโ๏ธ๐คฆ๐ปโโ๏ธ๐คฆ๐ปโโ๏ธ๐คฆ๐ผโโ๏ธ๐คฆ๐ผโโ๏ธ๐คฆ๐ฝโโ๏ธ๐คฆ๐ฝโโ๏ธ๐คฆ๐พโโ๏ธ๐คฆ๐พโโ๏ธ๐คฆ๐ฟโโ๏ธ๐คฆ๐ฟโโ๏ธ๐คทโโ๏ธ๐คทโโ๏ธ๐คท๐ปโโ๏ธ๐คท๐ปโโ๏ธ๐คท๐ผโโ๏ธ๐คท๐ผโโ๏ธ๐คท๐ฝโโ๏ธ๐คท๐ฝโโ๏ธ๐คท๐พโโ๏ธ๐คท๐พโโ๏ธ๐คท๐ฟโโ๏ธ๐คท๐ฟโโ๏ธ</div>
</div>
</body>
</html>
`);
var session = await page.createSession();
testRunner.log('Test passes if emoji are renderered using only Noto Color Emoji, no glyphs from Linux Libertine.');
testRunner.log('Note: Emoji rendering output in this text only representation is not equivalent to internal page appearance.');
var helper = await testRunner.loadScript('./resources/layout-font-test.js');
var results = await helper(testRunner, session);
var emoji_fonts = results.find(x => x.selector === '#emoji_male_female_zwj_sequences').usedFonts;
var passed = (emoji_fonts.length === 1 && emoji_fonts[0].familyName.includes('Emoji'));
testRunner.log(passed ? 'PASS' : 'FAIL');
testRunner.completeTest();
})