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

Changeset 259059 in webkit


Ignore:
Timestamp:
Mar 26, 2020, 11:41:49 AM (6 years ago)
Author:
Alexey Shvayka
Message:

Sync wpt/domxpath and re-sync wpt/css/cssom-view from upstream
https://bugs.webkit.org/show_bug.cgi?id=209574

Reviewed by Antti Koivisto.

web-platform-tests revision: 1137f4bff2b7

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/css/cssom-view/*: Updated.
  • web-platform-tests/domxpath/*: Added.
Location:
trunk/LayoutTests
Files:
45 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r259051 r259059  
     12020-03-26  Alexey Shvayka  <shvaikalesh@gmail.com>
     2
     3        Sync wpt/domxpath and re-sync wpt/css/cssom-view from upstream
     4        https://bugs.webkit.org/show_bug.cgi?id=209574
     5
     6        Reviewed by Antti Koivisto.
     7
     8        web-platform-tests revision: 1137f4bff2b7
     9
     10        * resources/import-expectations.json:
     11        * resources/resource-files.json:
     12        * web-platform-tests/css/cssom-view/*: Updated.
     13        * web-platform-tests/domxpath/*: Added.
     14
    1152020-03-26  Antti Koivisto  <antti@apple.com>
    216
  • trunk/LayoutTests/imported/w3c/resources/import-expectations.json

    r258661 r259059  
    164164    "web-platform-tests/dom/traversal/unfinished": "skip",
    165165    "web-platform-tests/domparsing": "import",
    166     "web-platform-tests/domxpath": "skip",
     166    "web-platform-tests/domxpath": "import",
     167    "web-platform-tests/domxpath/xml_xpath_runner.html": "skip",
     168    "web-platform-tests/domxpath/xml_xpath_tests.xml": "skip",
    167169    "web-platform-tests/dpub-aam": "skip",
    168170    "web-platform-tests/dpub-aria": "skip",
  • trunk/LayoutTests/imported/w3c/resources/resource-files.json

    r258661 r259059  
    11031103        "web-platform-tests/dom/traversal/unfinished/009.xml",
    11041104        "web-platform-tests/dom/traversal/unfinished/010.xml",
     1105        "web-platform-tests/domxpath/001.html",
     1106        "web-platform-tests/domxpath/xml_xpath_tests.xml",
    11051107        "web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-cseucpkdfmtjapanese.html",
    11061108        "web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-x-euc-jp.html",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent-expected.txt

    r254129 r259059  
    33FAIL looks up handleEvent method on every event dispatch promise_test: Unhandled rejection with value: object "TypeError: Argument 1 ('listener') to MediaQueryList.addListener must be a function"
    44PASS doesn't look up handleEvent method on callable event listeners
    5 FAIL rethrows errors when getting handleEvent promise_rejects_exactly: function "function () { throw e }" threw object "TypeError: Argument 1 ('listener') to MediaQueryList.addListener must be a function" but we expected it to throw object "[object Object]"
    6 PASS throws if handleEvent is falsy and not callable
    7 PASS throws if handleEvent is thruthy and not callable
     5FAIL rethrows errors when getting handleEvent assert_equals: handleEvent property was not looked up expected 1 but got 0
     6FAIL throws if handleEvent is falsy and not callable assert_equals: handleEvent property was not looked up expected 1 but got 0
     7FAIL throws if handleEvent is thruthy and not callable assert_equals: handleEvent property was not looked up expected 1 but got 0
    88
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent.html

    r254129 r259059  
    7272}, "doesn't look up handleEvent method on callable event listeners");
    7373
    74 const uncaught_error_test = async (t, listener) => {
    75     const mql = await createMQL(t);
    76     mql.addListener(listener);
     74const uncaught_error_test = async (t, mql, getHandleEvent) => {
     75    const eventWatcher = new EventWatcher(t, window, "error", waitForChangesReported);
     76    const errorPromise = eventWatcher.wait_for("error");
    7777
    78     const eventWatcher = new EventWatcher(t, window, "error");
    79     const errorPromise = eventWatcher.wait_for("error");
    80     triggerMQLEvent(mql);
    81 
    82     const event = await errorPromise;
    83     throw event.error;
    84 };
    85 
    86 promise_test(t => {
    87     const error = { name: "test" };
     78    let calls = 0;
    8879    const listener = {
    8980        get handleEvent() {
    90             throw error;
     81            calls++;
     82            return getHandleEvent();
    9183        },
    9284    };
    9385
    94     return promise_rejects_exactly(t, error, uncaught_error_test(t, listener));
     86    try {
     87        mql.addListener(listener);
     88        triggerMQLEvent(mql);
     89
     90        const event = await errorPromise;
     91        throw event.error;
     92    } finally {
     93        assert_equals(calls, 1, "handleEvent property was not looked up");
     94    }
     95};
     96
     97promise_test(async t => {
     98    const error = { name: "test" };
     99    const mql = await createMQL(t);
     100
     101    return promise_rejects_exactly(t, error,
     102        uncaught_error_test(t, mql, () => { throw error; }));
    95103}, "rethrows errors when getting handleEvent");
    96104
    97 promise_test(t => {
    98     const listener = { handleEvent: null };
    99     return promise_rejects(t, new TypeError(), uncaught_error_test(t, listener));
     105promise_test(async t => {
     106    const mql = await createMQL(t);
     107    const global = getWindow(mql);
     108    return promise_rejects_js(t, global.TypeError,
     109                              uncaught_error_test(t, mql, () => false));
    100110}, "throws if handleEvent is falsy and not callable");
    101111
    102 promise_test(t => {
    103     const listener = { handleEvent: "str" };
    104     return promise_rejects(t, new TypeError(), uncaught_error_test(t, listener));
     112promise_test(async t => {
     113    const mql = await createMQL(t);
     114    const global = getWindow(mql);
     115    return promise_rejects_js(t, global.TypeError,
     116                              uncaught_error_test(t, mql, () => "str"));
    105117}, "throws if handleEvent is thruthy and not callable");
    106118</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/elementFromPoint-expected.txt

    r232903 r259059  
    1616PASS no hit target at x,y
    1717PASS No viewport available
    18 FAIL Image Maps assert_equals: Should have returned the area element expected Element node <area id="rectG" shape="rect" coords="0,0,90,100" href="#... but got Element node <html><head><title>cssom-view - elementFromPoint</title>
    19 ...
     18PASS Image Maps
    2019PASS Fieldsets
    2120
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/elementFromPoint-parameters.html

    r254129 r259059  
    88function validate_function_parameter_count(testFunc, funcName) {
    99    test(function() {
    10         assert_throws(new TypeError(), function() {
     10        assert_throws_js(TypeError, function() {
    1111            testFunc();
    1212        }, "Called with no parameter");
    13         assert_throws(new TypeError(), function() {
     13        assert_throws_js(TypeError, function() {
    1414            testFunc(0);
    1515        }, "Called with 1 parameter");
     
    1919function validate_function_parameter_type(testFunc, funcName) {
    2020    test(function() {
    21         assert_throws(new TypeError(), function() {
     21        assert_throws_js(TypeError, function() {
    2222            testFunc(0, Infinity);
    2323        }, "Passing Infinity as second parameter throws");
    24         assert_throws(new TypeError(), function() {
     24        assert_throws_js(TypeError, function() {
    2525            testFunc(Infinity, 0);
    2626        }, "Passing Infinity as first parameter throws");
    27         assert_throws(new TypeError(), function() {
     27        assert_throws_js(TypeError, function() {
    2828            testFunc(0, NaN);
    2929        }, "Passing NaN as second parameter throws");
    30         assert_throws(new TypeError(), function() {
     30        assert_throws_js(TypeError, function() {
    3131            testFunc(NaN, 0);
    3232        }, "Passing NaN as first parameter throws");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/elementFromPoint.html

    r254129 r259059  
    175175          var image = document.getElementById('dinos');
    176176          area.scrollIntoView();
    177           var areaRect = area.getBoundingClientRect();
     177          var areaRect = image.getBoundingClientRect();
     178          areaRect.width = Math.min(areaRect.width, 90);
     179          areaRect.height = Math.min(areaRect.height, 100);
    178180          assert_equals(document.elementFromPoint(areaRect.left + Math.round(areaRect.width/2),
    179181                                                  areaRect.top + Math.round(areaRect.height/2)),
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/w3c-import.log

    r254129 r259059  
    2929/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-001.html
    3030/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-002.html
     31/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003.html
    3132/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-expected.html
    3233/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html
Note: See TracChangeset for help on using the changeset viewer.