Commit 2ab05d34 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Using local() fonts in unit tests doesn't work.

The test is not relying on fonts loading, but start using dummy urls
instead.

Bug: 875805
Change-Id: I4821e9e74fc9383d77ec2afd57652103e72f35c2
Reviewed-on: https://chromium-review.googlesource.com/1182807Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584683}
parent 9a9b1bb5
......@@ -87,14 +87,11 @@ TEST_F(StyleEngineTest, DocumentDirtyAfterInject) {
}
TEST_F(StyleEngineTest, AnalyzedInject) {
// TODO(crbug.com/875805): src: local() lookups do not work in DummyPageHolder
// on platforms where out of process lookups are needed for src: local()
// lookups.
GetDocument().body()->SetInnerHTMLFromString(R"HTML(
<style>
@font-face {
font-family: 'Cool Font';
src: local(monospace);
src: url(dummy);
font-weight: bold;
}
:root {
......@@ -252,11 +249,10 @@ TEST_F(StyleEngineTest, AnalyzedInject) {
font_face_parsed_sheet->ParseString(
"@font-face {"
" font-family: 'Cool Font';"
" src: local(monospace);"
" src: url(dummy);"
" font-weight: bold;"
" font-style: italic;"
"}"
);
"}");
StyleSheetKey font_face_key("font_face");
GetStyleEngine().InjectSheet(font_face_key, font_face_parsed_sheet,
WebDocument::kUserOrigin);
......@@ -281,11 +277,10 @@ TEST_F(StyleEngineTest, AnalyzedInject) {
style_element->SetInnerHTMLFromString(
"@font-face {"
" font-family: 'Cool Font';"
" src: local(monospace);"
" src: url(dummy);"
" font-weight: normal;"
" font-style: italic;"
"}"
);
"}");
GetDocument().body()->AppendChild(style_element);
GetDocument().View()->UpdateAllLifecyclePhases();
......
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