Changeset 211060 in webkit


Ignore:
Timestamp:
Jan 23, 2017 1:41:23 PM (7 years ago)
Author:
mmaxfield@apple.com
Message:

Migrate font variations tests to using David Jonathan Ross's Boxis font
https://bugs.webkit.org/show_bug.cgi?id=167222

Reviewed by Dean Jackson.

He extremely generously made this font for doing testing of variation fonts,
and worked with us to licence it appropriately so it can be used in WebKit
directly.

Thanks so much to DJR!!!!

I also took this opportunity to make the tests in animations/font-variations
more robust.

  • animations/font-variations/font-variation-settings-expected.html: Removed.
  • animations/font-variations/font-variation-settings-expected.txt: Added.
  • animations/font-variations/font-variation-settings-order-expected.html: Removed.
  • animations/font-variations/font-variation-settings-order-expected.txt: Added.
  • animations/font-variations/font-variation-settings-order.html:
  • animations/font-variations/font-variation-settings-unlike-expected.html: Removed.
  • animations/font-variations/font-variation-settings-unlike-expected.txt: Added.
  • animations/font-variations/font-variation-settings-unlike.html:
  • animations/font-variations/font-variation-settings.html:
  • animations/font-variations/resources/Boxis-VF.ttf: Added.
  • fast/backgrounds/background-repeat-x-y.html: Removed.
  • fast/text/variations/advances.html:
  • fast/text/variations/case-axis-names-expected.html:
  • fast/text/variations/case-axis-names.html:
  • fast/text/variations/default-value-expected.html:
  • fast/text/variations/default-value.html:
  • fast/text/variations/duplicate-axis-expected.html: Removed.
  • fast/text/variations/duplicate-axis.html: Removed.
  • fast/text/variations/duplicate-expected.html:
  • fast/text/variations/duplicate.html:
  • fast/text/variations/exist-expected-mismatch.html:
  • fast/text/variations/exist.html:
  • fast/text/variations/getComputedStyle-expected.txt:
  • fast/text/variations/getComputedStyle.html:
  • fast/text/variations/inheritance-expected.html:
  • fast/text/variations/inheritance.html:
  • fast/text/variations/order-expected.html:
  • fast/text/variations/order.html:
  • fast/text/variations/outofbounds-expected-mismatch.html:
  • fast/text/variations/outofbounds.html:
  • fast/text/variations/resources/Boxis-VF.ttf: Added.
  • platform/mac/TestExpectations:
Location:
trunk/LayoutTests
Files:
7 added
6 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r211059 r211060  
     12017-01-23  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Migrate font variations tests to using David Jonathan Ross's Boxis font
     4        https://bugs.webkit.org/show_bug.cgi?id=167222
     5
     6        Reviewed by Dean Jackson.
     7
     8        He extremely generously made this font for doing testing of variation fonts,
     9        and worked with us to licence it appropriately so it can be used in WebKit
     10        directly.
     11
     12        Thanks so much to DJR!!!!
     13
     14        I also took this opportunity to make the tests in animations/font-variations
     15        more robust.
     16
     17        * animations/font-variations/font-variation-settings-expected.html: Removed.
     18        * animations/font-variations/font-variation-settings-expected.txt: Added.
     19        * animations/font-variations/font-variation-settings-order-expected.html: Removed.
     20        * animations/font-variations/font-variation-settings-order-expected.txt: Added.
     21        * animations/font-variations/font-variation-settings-order.html:
     22        * animations/font-variations/font-variation-settings-unlike-expected.html: Removed.
     23        * animations/font-variations/font-variation-settings-unlike-expected.txt: Added.
     24        * animations/font-variations/font-variation-settings-unlike.html:
     25        * animations/font-variations/font-variation-settings.html:
     26        * animations/font-variations/resources/Boxis-VF.ttf: Added.
     27        * fast/backgrounds/background-repeat-x-y.html: Removed.
     28        * fast/text/variations/advances.html:
     29        * fast/text/variations/case-axis-names-expected.html:
     30        * fast/text/variations/case-axis-names.html:
     31        * fast/text/variations/default-value-expected.html:
     32        * fast/text/variations/default-value.html:
     33        * fast/text/variations/duplicate-axis-expected.html: Removed.
     34        * fast/text/variations/duplicate-axis.html: Removed.
     35        * fast/text/variations/duplicate-expected.html:
     36        * fast/text/variations/duplicate.html:
     37        * fast/text/variations/exist-expected-mismatch.html:
     38        * fast/text/variations/exist.html:
     39        * fast/text/variations/getComputedStyle-expected.txt:
     40        * fast/text/variations/getComputedStyle.html:
     41        * fast/text/variations/inheritance-expected.html:
     42        * fast/text/variations/inheritance.html:
     43        * fast/text/variations/order-expected.html:
     44        * fast/text/variations/order.html:
     45        * fast/text/variations/outofbounds-expected-mismatch.html:
     46        * fast/text/variations/outofbounds.html:
     47        * fast/text/variations/resources/Boxis-VF.ttf: Added.
     48        * platform/mac/TestExpectations:
     49
    1502017-01-23  Ryan Haddad  <ryanhaddad@apple.com>
    251
  • trunk/LayoutTests/animations/font-variations/font-variation-settings-order.html

    r210315 r211060  
    44<script src="../resources/animation-test-helpers.js"></script>
    55<style>
    6 @keyframes weightAnimation {
     6@font-face {
     7    font-family: "Boxis";
     8    src: url("resources/Boxis-VF.ttf");
     9}
     10
     11@keyframes TheAnimation {
    712    from {
    8         font-variation-settings: "wght" 0.5, "wdth" 0.9;
     13        font-variation-settings: "hght" 400, "wdth" 500;
    914    }
    1015    to {
    11         font-variation-settings: "wdth" 1.2, "wght" 3.2;
     16        font-variation-settings: "wdth" 900, "hght" 800;
    1217    }
    1318}
    1419
    1520#box {
    16     font: 100px "Skia";
    17     animation-name: "weightAnimation";
     21    font: 100px "Boxis";
    1822    animation-duration: 3s;
    1923    animation-timing-function: linear;
     
    2731var expectedValues = [
    2832    // [animation-name, time, element-id, property, expected-value, tolerance]
    29     ["weightAnimation", 0.5, "box", "font-variation-settings", "'wght' 0.95, 'wdth' 0.95", 0.05],
    30     ["weightAnimation", 1.0, "box", "font-variation-settings", "'wght' 1.4, 'wdth' 1", 0.05],
    31     ["weightAnimation", 2.0, "box", "font-variation-settings", "'wght' 2.3, 'wdth' 1.1", 0.05],
     33    ["TheAnimation", 0.5, "box", "font-variation-settings", "'wdth' 566.6666, 'hght' 466.6666", 5],
     34    ["TheAnimation", 1.0, "box", "font-variation-settings", "'wdth' 633.3333, 'hght' 533.3333", 5],
     35    ["TheAnimation", 2.0, "box", "font-variation-settings", "'wdth' 766.6666, 'hght' 666.6666", 5],
    3236];
    33 runAnimationTest(expectedValues, undefined, undefined, undefined, true, undefined);
     37
     38if (window.testRunner) {
     39    testRunner.waitUntilDone();
     40}
     41
     42var promises = [];
     43
     44document.fonts.forEach(function(f) {
     45    promises.push(f.loaded);
     46});
     47
     48Promise.all(promises).then(function() {
     49    document.getElementById("box").style.animationName = "TheAnimation";
     50    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
     51});
    3452</script>
    3553</body>
  • trunk/LayoutTests/animations/font-variations/font-variation-settings-unlike.html

    r210315 r211060  
    44<script src="../resources/animation-test-helpers.js"></script>
    55<style>
    6 @keyframes weightAnimation {
     6@font-face {
     7    font-family: "Boxis";
     8    src: url("resources/Boxis-VF.ttf");
     9}
     10
     11@keyframes TheAnimation {
    712    from {
    8         font-variation-settings: "wght" 0.5, "wdth" 0.9;
     13        font-variation-settings: "hght" 400, "wdth" 500;
    914    }
    1015    to {
    11         font-variation-settings: "wght" 3.2;
     16        font-variation-settings: "hght" 600;
    1217    }
    1318}
    1419
    1520#box {
    16     font: 100px "Skia";
    17     animation-name: "weightAnimation";
     21    font: 100px "Boxis";
    1822    animation-duration: 3s;
    1923    animation-timing-function: linear;
     
    2731var expectedValues = [
    2832    // [animation-name, time, element-id, property, expected-value, tolerance]
    29     ["weightAnimation", 0.5, "box", "font-variation-settings", "normal", 0.05],
    30     ["weightAnimation", 1.0, "box", "font-variation-settings", "normal", 0.05],
    31     ["weightAnimation", 2.0, "box", "font-variation-settings", "normal", 0.05],
     33    ["TheAnimation", 0.5, "box", "font-variation-settings", "normal", 5],
     34    ["TheAnimation", 1.0, "box", "font-variation-settings", "normal", 5],
     35    ["TheAnimation", 2.0, "box", "font-variation-settings", "normal", 5],
    3236];
    33 runAnimationTest(expectedValues, undefined, undefined, undefined, true, undefined);
     37
     38if (window.testRunner) {
     39    testRunner.waitUntilDone();
     40}
     41
     42var promises = [];
     43
     44document.fonts.forEach(function(f) {
     45    promises.push(f.loaded);
     46});
     47
     48Promise.all(promises).then(function() {
     49    document.getElementById("box").style.animationName = "TheAnimation";
     50    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
     51});
    3452</script>
    3553</body>
  • trunk/LayoutTests/animations/font-variations/font-variation-settings.html

    r210315 r211060  
    44<script src="../resources/animation-test-helpers.js"></script>
    55<style>
    6 @keyframes weightAnimation {
     6@font-face {
     7    font-family: "Boxis";
     8    src: url("resources/Boxis-VF.ttf");
     9}
     10
     11@keyframes TheAnimation {
    712    from {
    8         font-variation-settings: "wght" 0.1;
     13        font-variation-settings: "wdth" 400;
    914    }
    1015    to {
    11         font-variation-settings: "wght" 1.9;
     16        font-variation-settings: "wdth" 900;
    1217    }
    1318}
    1419
    1520#box {
    16     font: 100px "-apple-system";
    17     animation-name: "weightAnimation";
     21    font: 100px "Boxis";
    1822    animation-duration: 3s;
    1923    animation-timing-function: linear;
     
    2731var expectedValues = [
    2832    // [animation-name, time, element-id, property, expected-value, tolerance]
    29     ["weightAnimation", 0.5, "box", "font-variation-settings", "'wght' 0.4", 0.05],
    30     ["weightAnimation", 1.0, "box", "font-variation-settings", "'wght' 0.7", 0.05],
    31     ["weightAnimation", 2.0, "box", "font-variation-settings", "'wght' 1.3", 0.05],
     33    ["TheAnimation", 0.5, "box", "font-variation-settings", "'wdth' 483.3333", 5],
     34    ["TheAnimation", 1.0, "box", "font-variation-settings", "'wdth' 566.6666", 5],
     35    ["TheAnimation", 2.0, "box", "font-variation-settings", "'wdth' 733.3333", 5],
    3236];
    33 runAnimationTest(expectedValues, undefined, undefined, undefined, true, undefined);
     37
     38if (window.testRunner) {
     39    testRunner.waitUntilDone();
     40}
     41
     42var promises = [];
     43
     44document.fonts.forEach(function(f) {
     45    promises.push(f.loaded);
     46});
     47
     48Promise.all(promises).then(function() {
     49    document.getElementById("box").style.animationName = "TheAnimation";
     50    runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
     51});
    3452</script>
    3553</body>
  • trunk/LayoutTests/fast/text/variations/advances.html

    r206896 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410<script src="../../../resources/js-test-pre.js"></script>
    511</head>
    612<body>
    7 <div><span id="regular" style="font: 100px 'Skia';">ham</span></div>
    8 <div><span id="wide" style="font: 100px 'Skia'; font-variation-settings: 'wdth' 1.25;">ham</span></div>
    9 <div><span id="specifiedregular" style="font: 100px 'Skia'; font-variation-settings: 'wdth' 1;">ham</span></div>
    10 <div><span id="narrow" style="font: 100px 'Skia'; font-variation-settings: 'wdth' 0.62;">ham</span></div>
     13<div><span id="regular" style="font: 100px 'Boxis';">ham</span></div>
     14<div><span id="wide" style="font: 100px 'Boxis'; font-variation-settings: 'wdth' 900;">ham</span></div>
     15<div><span id="specifiedregular" style="font: 100px 'Boxis'; font-variation-settings: 'wdth' 750;">ham</span></div>
     16<div><span id="narrow" style="font: 100px 'Boxis'; font-variation-settings: 'wdth' 500;">ham</span></div>
    1117<script>
    12 var regular = document.getElementById("regular");
    13 var wide = document.getElementById("wide");
    14 var specifiedregular = document.getElementById("specifiedregular");
    15 var narrow = document.getElementById("narrow");
     18window.jsTestIsAsync = true;
    1619
    17 shouldNotBe("regular.offsetWidth", "wide.offsetWidth");
    18 shouldNotBe("regular.offsetWidth", "narrow.offsetWidth");
    19 shouldNotBe("narrow.offsetWidth", "wide.offsetWidth");
    20 shouldBe("regular.offsetWidth", "specifiedregular.offsetWidth");
     20var promises = [];
     21
     22document.fonts.forEach(function(f) {
     23        promises.push(f.loaded);
     24});
     25
     26Promise.all(promises).then(function() {
     27        var regular = document.getElementById("regular");
     28        var wide = document.getElementById("wide");
     29        var specifiedregular = document.getElementById("specifiedregular");
     30        var narrow = document.getElementById("narrow");
     31
     32        shouldNotBe("regular.offsetWidth", "wide.offsetWidth");
     33        shouldNotBe("regular.offsetWidth", "narrow.offsetWidth");
     34        shouldNotBe("narrow.offsetWidth", "wide.offsetWidth");
     35        shouldBe("regular.offsetWidth", "specifiedregular.offsetWidth");
     36        finishJSTest();
     37});
     38
    2139</script>
    2240<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/text/variations/case-axis-names-expected.html

    r207581 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    612This test passes if capitalized and lowercased axis names are distinct.
    7 <div style="font: 100px '-apple-system';">Hello</div>
     13<div style="font: 100px 'Boxis';">Hello</div>
    814</body>
    915</html>
  • trunk/LayoutTests/fast/text/variations/case-axis-names.html

    r207581 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    612This test passes if capitalized and lowercased axis names are distinct.
    7 <div style="font: 100px '-apple-system'; font-variation-settings: 'WGHT' 1.8;">Hello</div>
     13<div style="font: 100px 'Boxis'; font-variation-settings: 'WDTH' 900;">Hello</div>
    814</body>
    915</html>
  • trunk/LayoutTests/fast/text/variations/default-value-expected.html

    r210054 r211060  
    22<html>
    33<head>
    4 <script>
    5 if (window.internals)
    6    window.internals.settings.setVariationFontsEnabled(true);
    7 </script>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    810</head>
    911<body>
    1012This test makes sure that default values of variations get applied correctly. The test fails if the text below isn't thin.
    11 <div style="font: 70px 'Skia'; font-variation-settings: 'wght' 1.000001;">hamburgefonstiv</div>
     13<div style="font: 70px 'Boxis'; font-variation-settings: 'wdth' 750.000001;">hamburgefonstiv</div>
    1214</body>
    1315<html>
  • trunk/LayoutTests/fast/text/variations/default-value.html

    r210054 r211060  
    22<html>
    33<head>
    4 <script>
    5 if (window.internals)
    6    window.internals.settings.setVariationFontsEnabled(true);
    7 </script>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    810</head>
    911<body>
    1012This test makes sure that default values of variations get applied correctly. The test fails if the text below isn't thin.
    11 <div style="font: 70px 'Skia'; font-variation-settings: 'wght' 1.0;">hamburgefonstiv</div>
     13<div style="font: 70px 'Boxis'; font-variation-settings: 'wdth' 750;">hamburgefonstiv</div>
    1214</body>
    1315<html>
  • trunk/LayoutTests/fast/text/variations/duplicate-expected.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 3;">Test passes if this text has a weight of 3.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 500;">Test passes if this text has a width of 500.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/duplicate.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wght' 3;">Test passes if this text has a weight of 3.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 900, 'wdth' 500;">Test passes if this text has a width of 500.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/exist-expected-mismatch.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia';">Test passes if this text is bold.</div>
     12<div style="font-family: 'Boxis';">Test passes if this text is wide.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/exist.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: '-apple-system'; font-variation-settings: 'wght' 1.8;">Test passes if this text is bold.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 900;">Test passes if this text is wide.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/getComputedStyle-expected.txt

    r206679 r211060  
    1 PASS window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings') is "'wght' 2"
    2 PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings') is "'wght' 3"
    3 PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings') is "'wght' 2, 'wdth' 1.2"
    4 PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings') is window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings')
     1PASS window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings') is "'hght' 400"
     2PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings') is "'hght' 500"
     3PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings') is "'wdth' 500, 'hght' 400"
     4PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings') is window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')
    55PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-variation-settings') is "normal"
    66PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-variation-settings') is "normal"
    77PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-variation-settings') is "normal"
    8 PASS window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings') is "'wght' 27"
     8PASS window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings') is "'hght' 999999"
    99PASS successfullyParsed is true
    1010
    1111TEST COMPLETE
    12 
     12a
     13a
     14a
     15a
     16a
     17a
     18a
     19a
  • trunk/LayoutTests/fast/text/variations/getComputedStyle.html

    r210315 r211060  
    33<head>
    44<meta charset="utf-8">
     5<style>
     6@font-face {
     7        font-family: "Boxis";
     8        src: url("resources/Boxis-VF.ttf");
     9}
     10</style>
    511<script src="../../../resources/js-test-pre.js"></script>
    612</head>
    713<body>
    8 <div id="test0" style="font-family: 'Skia'; font-variation-settings: 'wght' 2;"></div>
    9 <div id="test1" style="font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wght' 3;"></div>
    10 <div id="test2" style="font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wdth' 1.2;"></div>
    11 <div id="test3" style="font-family: 'Skia'; font-variation-settings: 'wdth' 1.2, 'wght' 2;"></div>
    12 <div id="test4" style="font-family: 'Skia'; font-variation-settings: normal;"></div>
    13 <div id="test5" style="font-family: 'Skia'; font-variation-settings: 'abcde' 3;"></div>
    14 <div id="test6" style="font-family: 'Skia'; font-variation-settings: 'abc한국어e' 3;"></div>
    15 <div id="test7" style="font-family: 'Skia'; font-variation-settings: 'wght' 27;"></div>
     14<div id="test0" style="font-family: 'Boxis'; font-variation-settings: 'hght' 400;">a</div>
     15<div id="test1" style="font-family: 'Boxis'; font-variation-settings: 'hght' 400, 'hght' 500;">a</div>
     16<div id="test2" style="font-family: 'Boxis'; font-variation-settings: 'hght' 400, 'wdth' 500;">a</div>
     17<div id="test3" style="font-family: 'Boxis'; font-variation-settings: 'wdth' 500, 'hght' 400;">a</div>
     18<div id="test4" style="font-family: 'Boxis'; font-variation-settings: normal;">a</div>
     19<div id="test5" style="font-family: 'Boxis'; font-variation-settings: 'abcde' 500;">a</div>
     20<div id="test6" style="font-family: 'Boxis'; font-variation-settings: 'abc한국어e' 500;">a</div>
     21<div id="test7" style="font-family: 'Boxis'; font-variation-settings: 'hght' 999999;">a</div>
    1622<script>
    17 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings')", "'wght' 2");
    18 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings')", "'wght' 3");
    19 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')", "'wght' 2, 'wdth' 1.2");
    20 shouldBe("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')", "window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings')");
    21 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-variation-settings')", "normal");
    22 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-variation-settings')", "normal");
    23 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-variation-settings')", "normal");
    24 shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings')", "'wght' 27");
     23window.jsTestIsAsync = true;
     24
     25var promises = [];
     26
     27document.fonts.forEach(function(f) {
     28        promises.push(f.loaded);
     29});
     30
     31Promise.all(promises).then(function() {
     32        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test0')).getPropertyValue('font-variation-settings')", "'hght' 400");
     33        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-variation-settings')", "'hght' 500");
     34        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')", "'wdth' 500, 'hght' 400");
     35        shouldBe("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-variation-settings')", "window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-variation-settings')");
     36        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-variation-settings')", "normal");
     37        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-variation-settings')", "normal");
     38        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-variation-settings')", "normal");
     39        shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-variation-settings')", "'hght' 999999");
     40        finishJSTest();
     41});
    2542</script>
    2643<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/text/variations/inheritance-expected.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 2;">Test passes if this text is bold.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 900;">Test passes if this text is wide.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/inheritance.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 2;"><div>Test passes if this text is bold.</div></div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 900;"><div>Test passes if this text is wide.</div></div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/order-expected.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wdth' 1.2, 'wght' 2;">Test passes if this text has a weight of 3.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 500, 'hght' 400;">Test passes if this text has a height of 400 and a width of 500.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/order.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 2, 'wdth' 1.2;">Test passes if this text has a weight of 3.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'hght' 400, 'wdth' 500;">Test passes if this text has a height of 400 and a width of 500.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/fast/text/variations/outofbounds-expected-mismatch.html

    r210054 r211060  
    22<html>
    33<head>
    4 <script>
    5 if (window.internals)
    6    window.internals.settings.setVariationFontsEnabled(true);
    7 </script>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    810</head>
    911<body>
    10 <div style="font-family: 'Skia';">Test passes if this text is bold.</div>
     12<div style="font-family: 'Boxis';">Test passes if this text is wide.</div>
    1113</body>
    1214</html>
  • trunk/LayoutTests/fast/text/variations/outofbounds.html

    r210315 r211060  
    22<html>
    33<head>
     4<style>
     5@font-face {
     6        font-family: "Boxis";
     7        src: url("resources/Boxis-VF.ttf");
     8}
     9</style>
    410</head>
    511<body>
    6 <div style="font-family: 'Skia'; font-variation-settings: 'wght' 27;">Test passes if this text is bold.</div>
     12<div style="font-family: 'Boxis'; font-variation-settings: 'wdth' 9999999999;">Test passes if this text is wide.</div>
    713</body>
    814</html>
  • trunk/LayoutTests/platform/mac/TestExpectations

    r211059 r211060  
    14301430
    14311431# rdar://problem/28586837
    1432 fast/text/variations/order.html [ Crash ]
    1433 animations/font-variations/font-variation-settings-order.html [ Pass Failure ImageOnlyFailure Crash ]
     1432fast/text/variations/order.html [ Pass Crash ]
     1433animations/font-variations/font-variation-settings-order.html [ Pass Crash ]
    14341434# Variation fonts are not implemented earlier than Sierra.
    14351435[ ElCapitan Yosemite ] fast/text/variations [ Pass Failure ImageOnlyFailure ]
Note: See TracChangeset for help on using the changeset viewer.