Commit 0431f251 authored by Alex Rudenko's avatar Alex Rudenko Committed by Commit Bot

Use Amstelvar font in inspector-protocol tests

Amstelvar has many font variation axes so it's better to use it in a
test.

Bug: 1101236
Change-Id: Ic15f80b9adcee826b7f0fb30904f3a4f8bfbb2cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2319986
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: default avatarMathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791726}
parent dd1bd07b
Verifies that CSS.fontsUpdated events are sent after CSS domain is enabled Verifies that CSS.fontsUpdated events are sent after CSS domain is enabled
{ {
fontFamily : Noto Mono fontFamily : Amstelvar
fontStretch : normal fontStretch : normal
fontStyle : normal fontStyle : normal
fontVariant : normal fontVariant : normal
fontVariationAxes : [
[0] : {
defaultValue : 400
maxValue : 900
minValue : 100
name : wght
tag : wght
}
[1] : {
defaultValue : 100
maxValue : 125
minValue : 50
name : wdth
tag : wdth
}
[2] : {
defaultValue : 14
maxValue : 144
minValue : 8
name : opsz
tag : opsz
}
[3] : {
defaultValue : 0
maxValue : 1
minValue : -1
name : GRAD
tag : GRAD
}
[4] : {
defaultValue : 562
maxValue : 640
minValue : 324
name : XTRA
tag : XTRA
}
[5] : {
defaultValue : 176
maxValue : 263
minValue : 18
name : XOPQ
tag : XOPQ
}
[6] : {
defaultValue : 124
maxValue : 132
minValue : 15
name : YOPQ
tag : YOPQ
}
[7] : {
defaultValue : 500
maxValue : 570
minValue : 420
name : YTLC
tag : YTLC
}
[8] : {
defaultValue : 750
maxValue : 1000
minValue : 500
name : YTUC
tag : YTUC
}
[9] : {
defaultValue : 767
maxValue : 983
minValue : 500
name : YTAS
tag : YTAS
}
[10] : {
defaultValue : -240
maxValue : -138
minValue : -500
name : YTDE
tag : YTDE
}
[11] : {
defaultValue : 760
maxValue : 1000
minValue : 425
name : YTFI
tag : YTFI
}
]
fontWeight : normal fontWeight : normal
platformFontFamily : ಠ_ಠNoto Monoಠ_ಠ platformFontFamily : Amstelvar Roman
src : <string> src : <string>
unicodeRange : U+0-10FFFE unicodeRange : U+0-10FFFF
} }
SUCCESS: CSS.FontsUpdated events received. SUCCESS: CSS.FontsUpdated events received.
(async function(testRunner) { (async function(testRunner) {
const {session, dp} = await testRunner.startHTML( const {dp} = await testRunner.startHTML(
`<link rel="stylesheet" href="${testRunner.url('./resources/noto-mono.css')}"> `<style>
@font-face {
font-family: Amstelvar;
src: url('../../third_party/Amstelvar/Amstelvar.ttf');
}
body {
font-family: Amstelvar;
}
</style>
some text`, some text`,
'Verifies that CSS.fontsUpdated events are sent after CSS domain is enabled' 'Verifies that CSS.fontsUpdated events are sent after CSS domain is enabled'
); );
const eventPromise = dp.CSS.onceFontsUpdated( const eventPromise = dp.CSS.onceFontsUpdated(
event => typeof event.params.font !== 'undefined' && event => typeof event.params.font !== 'undefined' &&
event.params.font.fontFamily === 'Noto Mono'); event.params.font.fontFamily === 'Amstelvar');
await dp.DOM.enable(); await dp.DOM.enable();
await dp.CSS.enable(); await dp.CSS.enable();
const event = await eventPromise; const event = await eventPromise;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment