⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268961 in webkit


Ignore:
Timestamp:
Oct 25, 2020, 2:43:54 PM (6 years ago)
Author:
emilio
Message:

Update CSSOM WPT tests.
​https://bugs.webkit.org/show_bug.cgi?id=218157

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/css/cssom/CSS.html: Removed.
  • web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt: Added.
  • web-platform-tests/css/cssom/CSSCounterStyleRule.html: Added.
  • web-platform-tests/css/cssom/CSSFontFaceRule-expected.txt: Added.
  • web-platform-tests/css/cssom/CSSFontFaceRule.html: Added.
  • web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative-expected.txt:
  • web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:
  • web-platform-tests/css/cssom/css-style-attr-decl-block.html:
  • web-platform-tests/css/cssom/cssimportrule.html:
  • web-platform-tests/css/cssom/escape.html:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html:
  • web-platform-tests/css/cssom/getComputedStyle-resolved-colors-expected.txt: Added.
  • web-platform-tests/css/cssom/getComputedStyle-resolved-colors.html: Added.
  • web-platform-tests/css/cssom/medialist-interfaces-003-expected.txt: Removed.
  • web-platform-tests/css/cssom/medialist-interfaces-003.html: Removed.
  • web-platform-tests/css/cssom/mediaquery-sort-dedup-expected.txt: Added.
  • web-platform-tests/css/cssom/mediaquery-sort-dedup.html: Added.
  • web-platform-tests/css/cssom/removerule-invalidation-crash.html: Added.
  • web-platform-tests/css/cssom/rule-restrictions-expected.txt: Added.
  • web-platform-tests/css/cssom/rule-restrictions.html: Added.
  • web-platform-tests/css/cssom/serialize-media-rule-expected.txt:
  • web-platform-tests/css/cssom/serialize-media-rule.html:
  • web-platform-tests/css/cssom/w3c-import.log:

LayoutTests:

  • tests-options.json:
Location:
trunk/LayoutTests
Files:
11 added
3 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r268958 r268961  
     12020-10-25  Emilio Cobos Álvarez  <emilio@crisal.io>
     2
     3        Update CSSOM WPT tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=218157
     5
     6        Reviewed by Simon Fraser.
     7
     8        * tests-options.json:
     9
    1102020-10-25  Zalan Bujtas  <zalan@apple.com>
    211
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r268928 r268961  
     12020-10-25  Emilio Cobos Álvarez  <emilio@crisal.io>
     2
     3        Update CSSOM WPT tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=218157
     5
     6        Reviewed by Simon Fraser.
     7
     8        * resources/resource-files.json:
     9        * web-platform-tests/css/cssom/CSS.html: Removed.
     10        * web-platform-tests/css/cssom/CSSCounterStyleRule-expected.txt: Added.
     11        * web-platform-tests/css/cssom/CSSCounterStyleRule.html: Added.
     12        * web-platform-tests/css/cssom/CSSFontFaceRule-expected.txt: Added.
     13        * web-platform-tests/css/cssom/CSSFontFaceRule.html: Added.
     14        * web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative-expected.txt:
     15        * web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:
     16        * web-platform-tests/css/cssom/css-style-attr-decl-block.html:
     17        * web-platform-tests/css/cssom/cssimportrule.html:
     18        * web-platform-tests/css/cssom/escape.html:
     19        * web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
     20        * web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html:
     21        * web-platform-tests/css/cssom/getComputedStyle-resolved-colors-expected.txt: Added.
     22        * web-platform-tests/css/cssom/getComputedStyle-resolved-colors.html: Added.
     23        * web-platform-tests/css/cssom/medialist-interfaces-003-expected.txt: Removed.
     24        * web-platform-tests/css/cssom/medialist-interfaces-003.html: Removed.
     25        * web-platform-tests/css/cssom/mediaquery-sort-dedup-expected.txt: Added.
     26        * web-platform-tests/css/cssom/mediaquery-sort-dedup.html: Added.
     27        * web-platform-tests/css/cssom/removerule-invalidation-crash.html: Added.
     28        * web-platform-tests/css/cssom/rule-restrictions-expected.txt: Added.
     29        * web-platform-tests/css/cssom/rule-restrictions.html: Added.
     30        * web-platform-tests/css/cssom/serialize-media-rule-expected.txt:
     31        * web-platform-tests/css/cssom/serialize-media-rule.html:
     32        * web-platform-tests/css/cssom/w3c-import.log:
     33
    1342020-10-23  Diego Pino Garcia  <dpino@igalia.com>
    235
  • trunk/LayoutTests/imported/w3c/resources/resource-files.json

    r268735 r268961  
    784784        "web-platform-tests/css/css-writing-modes/vertical-alignment-vrl-020.xht",
    785785        "web-platform-tests/css/cssom-view/iframe.html",
     786        "web-platform-tests/css/cssom/removerule-invalidation-crash.html",
    786787        "web-platform-tests/css/cssom/support/xmlss-pi.xhtml",
    787788        "web-platform-tests/css/mediaqueries/media-queries-001.xht",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative-expected.txt

    r265749 r268961  
    1 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Illegal constructor
    2 
    3 Harness Error (FAIL), message = Unhandled rejection: Illegal constructor
    41
    52FAIL Inserting an @import rule through insertRule on a constructed stylesheet throws an exception assert_throws_dom: function "() => { (new CSSStyleSheet).insertRule(import_text) }" threw object "TypeError: Illegal constructor" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
    6 TIMEOUT @import rules should not trigger any loads. Test timed out
     3FAIL @import rules should not trigger any loads. promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor"
    74FAIL @import rules are not parsed in CSSStyleSheet.replace Illegal constructor
    85FAIL @import rules are not parsed in CSSStyleSheet.replaceSync Illegal constructor
    96
    10 Harness Error (FAIL), message = Unhandled rejection: Illegal constructor
    11 
    12 FAIL Inserting an @import rule through insertRule on a constructed stylesheet throws an exception assert_throws_dom: function "() => { (new CSSStyleSheet).insertRule(import_text) }" threw object "TypeError: Illegal constructor" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
    13 TIMEOUT @import rules should not trigger any loads. Test timed out
    14 FAIL @import rules are not parsed in CSSStyleSheet.replace Illegal constructor
    15 FAIL @import rules are not parsed in CSSStyleSheet.replaceSync Illegal constructor
    16 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html

    r264522 r268961  
    2222}, 'Inserting an @import rule through insertRule on a constructed stylesheet throws an exception');
    2323
    24 async_test(async t => {
     24promise_test(async t => {
    2525    const importUrl = "support/constructable-import.css";
    2626    const sheet = new CSSStyleSheet();
    … …  
    3333
    3434    let link = document.createElement("link");
     35    t.add_cleanup(() => { link.remove(); });
    3536    link.rel = "stylesheet";
    3637    link.href = importUrl;
    3738
    38     link.addEventListener("error", t.unreached_func("Load shouldn't fail"));
    39     link.addEventListener("load", t.step_func_done(event => {
    40       let entries = window.performance.getEntriesByType('resource').filter(entry => entry.name.includes(importUrl));
    41       assert_equals(entries.length, 1, "There should be only one entry for the import URL");
    42       assert_greater_than_equal(entries[0].startTime, timeAfterImportsInvoked, "The entry's start time should be after all throws");
    43       link.remove();
    44     }));
    45     document.body.appendChild(link);
     39    await new Promise((resolve, reject) => {
     40      link.addEventListener("load", resolve);
     41      link.addEventListener("error", reject);
     42      document.body.appendChild(link);
     43    });
     44
     45    let entries = window.performance.getEntriesByType('resource').filter(entry => entry.name.includes(importUrl));
     46    assert_equals(entries.length, 1, "There should be only one entry for the import URL");
     47    assert_greater_than_equal(entries[0].startTime, timeAfterImportsInvoked, "The entry's start time should be after all throws");
    4648}, "@import rules should not trigger any loads.")
    4749
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block.html

    r264522 r268961  
    9393  function assert_no_record(action) {
    9494    let records = observer.takeRecords();
    95     assert_true(records.length == 0, "expect no record after " + action);
     95    assert_equals(records.length, 0, "expect no record after " + action);
    9696  }
    9797  style.setProperty("z-index", "invalid");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssimportrule.html

    r232903 r268961  
    9696        test(function() {
    9797            var ruleWithPage = ruleList[3];
    98             ruleWithPage.style = "background-color: green;"
    99             assert_equals(ruleWithPage.style.cssText, "background-color: green;");
     98            ruleWithPage.style = "margin-top: 10px;"
     99            assert_equals(ruleWithPage.style.cssText, "margin-top: 10px;");
    100100        }, "CSSStyleDeclaration cssText attribute should be updated due to [PutForwards]");
    101101
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/escape.html

    r264522 r268961  
    8686  assert_equals(CSS.escape('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
    8787
     88  assert_equals(CSS.escape("hello\\world"), "hello\\\\world", "Backslashes get backslash-escaped");
     89  assert_equals(CSS.escape("hello\u{1234}world"), "hello\u{1234}world", "Code points greater than U+0080 are preserved");
     90  assert_equals(CSS.escape("-"), "\\-", "CSS.escape: Single dash escaped");
     91
    8892  assert_equals(CSS.escape('\x20\x21\x78\x79'), '\\ \\!xy');
    8993}, "Various tests");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-media-rule-expected.txt

    r264522 r268961  
    88FAIL features - character case normalization assert_equals: expected "@media screen and (color) {\n}" but got "@media screen and (color) { \n}"
    99FAIL features - preservation of overspecified features assert_equals: expected "@media print and (max-width: 23px) and (max-width: 45px) {\n}" but got "@media print and (max-width: 23px) and (max-width: 45px) { \n}"
    10 FAIL features - lexicographical sorting assert_equals: expected "@media screen and (color) and (max-width: 0px) {\n}" but got "@media screen and (color) and (max-width: 0px) { \n}"
     10FAIL features - no lexicographical sorting assert_equals: expected "@media screen and (color) and (max-width: 0px) {\n}" but got "@media screen and (color) and (max-width: 0px) { \n}"
    1111FAIL media query list assert_equals: expected "@media screen and (max-width: 0px), screen and (color) {\n}" but got "@media screen and (max-width: 0px), screen and (color) { \n}"
    1212FAIL one rule assert_equals: expected "@media print {\n  #foo { z-index: 23; float: left; }\n}" but got "@media print { \n  #foo { z-index: 23; float: left; }\n}"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-media-rule.html

    r264522 r268961  
    133133  assert_equals(
    134134    sheet.cssRules[1].cssText,
    135     '@media screen and (color) and (max-width: 0px) {\n}'
     135    '@media screen and (max-width: 0px) and (color) {\n}'
    136136  );
    137 }, 'features - lexicographical sorting');
     137}, 'features - no lexicographical sorting');
    138138
    139139test(function(t) {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/w3c-import.log

    r265294 r268961  
    1616List of files:
    1717/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS-namespace-object-class-string.html
    18 /LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSS.html
     18/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSCounterStyleRule.html
     19/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSFontFaceRule.html
    1920/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSGroupingRule-cssRules.html
    2021/LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSGroupingRule-insertRule.html
    … …  
    105106/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-property-order.html
    106107/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-pseudo.html
     108/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-resolved-colors.html
    107109/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-resolved-min-max-clamping.html
    108110/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html
    … …  
    122124/LayoutTests/imported/w3c/web-platform-tests/css/cssom/medialist-interfaces-001.html
    123125/LayoutTests/imported/w3c/web-platform-tests/css/cssom/medialist-interfaces-002.html
    124 /LayoutTests/imported/w3c/web-platform-tests/css/cssom/medialist-interfaces-003.html
    125126/LayoutTests/imported/w3c/web-platform-tests/css/cssom/medialist-interfaces-004.html
     127/LayoutTests/imported/w3c/web-platform-tests/css/cssom/mediaquery-sort-dedup.html
    126128/LayoutTests/imported/w3c/web-platform-tests/css/cssom/overflow-serialization.html
    127129/LayoutTests/imported/w3c/web-platform-tests/css/cssom/preferred-stylesheet-order.html
    128130/LayoutTests/imported/w3c/web-platform-tests/css/cssom/preferred-stylesheet-reversed-order.html
     131/LayoutTests/imported/w3c/web-platform-tests/css/cssom/removerule-invalidation-crash.html
     132/LayoutTests/imported/w3c/web-platform-tests/css/cssom/rule-restrictions.html
    129133/LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorSerialize.html
    130134/LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorText-modification-restyle-001-expected.html
  • trunk/LayoutTests/tests-options.json

    r267531 r268961  
    690690        "slow"
    691691    ],
     692    "imported/w3c/web-platform-tests/css/cssom/idlharness.html": [
     693        "slow"
     694    ],
    692695    "imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements.html": [
    693696        "slow"
Note: See TracChangeset for help on using the changeset viewer.