Changeset 253738 in webkit


Ignore:
Timestamp:
Dec 18, 2019 10:35:37 PM (4 years ago)
Author:
Chris Dumez
Message:

Resync web-platform-tests/dom tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=205420

Reviewed by Ryosuke Niwa.

Resync web-platform-tests/dom tests from upstream b5b7813e9ce247495b0df.

  • resources/resource-files.json:
  • web-platform-tests/dom/*: Updated.
Location:
trunk/LayoutTests
Files:
39 added
1 deleted
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/TestExpectations

    r253704 r253738  
    17861786imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/iceGatheringState.html [ Skip ]
    17871787imported/w3c/web-platform-tests/webrtc/RTCIceConnectionState-candidate-pair.https.html [ Skip ]
    1788 imported/w3c/web-platform-tests/dom/nodes/remove-and-adopt-crash.html [ Skip ]
    17891788
    17901789# Uses legacy WebRTC API.
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r253704 r253738  
     12019-12-18  Chris Dumez  <cdumez@apple.com>
     2
     3        Resync web-platform-tests/dom tests from upstream
     4        https://bugs.webkit.org/show_bug.cgi?id=205420
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Resync web-platform-tests/dom tests from upstream b5b7813e9ce247495b0df.
     9
     10        * resources/resource-files.json:
     11        * web-platform-tests/dom/*: Updated.
     12
    1132019-12-18  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/resources/resource-files.json

    r251779 r253738  
    815815        "web-platform-tests/dom/nodes/query-target-in-load-event.part.html",
    816816        "web-platform-tests/dom/ranges/Range-test-iframe.html",
     817        "web-platform-tests/dom/traversal/unfinished/001.xml",
     818        "web-platform-tests/dom/traversal/unfinished/002.xml",
     819        "web-platform-tests/dom/traversal/unfinished/003.xml",
     820        "web-platform-tests/dom/traversal/unfinished/004.xml",
     821        "web-platform-tests/dom/traversal/unfinished/005.xml",
     822        "web-platform-tests/dom/traversal/unfinished/006.xml",
     823        "web-platform-tests/dom/traversal/unfinished/007.xml",
     824        "web-platform-tests/dom/traversal/unfinished/008.xml",
     825        "web-platform-tests/dom/traversal/unfinished/009.xml",
     826        "web-platform-tests/dom/traversal/unfinished/010.xml",
    817827        "web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-cseucpkdfmtjapanese.html",
    818828        "web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-x-euc-jp.html",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log

    r249811 r253738  
    1818/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-delete.html
    1919/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-empty-name.html
     20/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-own-props.html
    2021/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-supported-property-indices.html
    2122/LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt

    r196520 r253738  
     1click me!
    12
    2 PASS EventTarget#dispatchEvent(): redispatching a native event
     3FAIL Redispatching DOMContentLoaded event after being dispatched assert_true: Received DOMContentLoaded event should be trusted before redispatching expected true got false
     4FAIL Redispatching mouseup event whose default action dispatches a click event assert_true: Received mouseup event should be trusted before redispatching from click event listener expected true got false
     5PASS Redispatching event which is being dispatched
     6PASS Synthesizing click on button... (button width / height: 62.734375 / 18)
    37
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html

    r217225 r253738  
    44<script src="/resources/testharness.js"></script>
    55<script src="/resources/testharnessreport.js"></script>
     6<script src="/resources/testdriver.js"></script>
     7<script src="/resources/testdriver-actions.js"></script>
     8<script src="/resources/testdriver-vendor.js"></script>
     9<button>click me!</button>
    610<div id=log></div>
    711<script>
    8 async_test(function() {
    9   var event;
    10   document.addEventListener("DOMContentLoaded", this.step_func(function(e) {
    11     assert_true(e.isTrusted, "Should be trusted when first handled");
    12     event = e;
    13   }), true);
     12var test_contentLoaded_redispatching = async_test("Redispatching DOMContentLoaded event after being dispatched");
     13var test_mouseup_redispatching = async_test("Redispatching mouseup event whose default action dispatches a click event");
     14var test_redispatching_of_dispatching_event = async_test("Redispatching event which is being dispatched");
    1415
    15   window.onload = this.step_func_done(function() {
    16     var received = 0;
    17     var target = document.createElement("span");
    18     target.addEventListener("DOMContentLoaded", this.step_func(function(e) {
    19       assert_false(e.isTrusted, "Should not be trusted during redispatching");
    20       ++received;
    21     }), true);
    22     assert_true(event.isTrusted, "Should be trusted before redispatching");
    23     target.dispatchEvent(event);
    24     assert_false(event.isTrusted, "Should not be trusted after redispatching");
    25     assert_equals(received, 1);
     16var buttonElement = document.querySelector("button");
     17var contentLoadedEvent;
     18
     19var waitForLoad = new Promise(resolve => {
     20  window.addEventListener("load", () => { requestAnimationFrame(resolve); }, {capture: false, once: true});
     21});
     22
     23document.addEventListener("DOMContentLoaded", event => {
     24  contentLoadedEvent = event;
     25  test_redispatching_of_dispatching_event.step(() => {
     26    assert_throws("InvalidStateError", () => {
     27      document.dispatchEvent(contentLoadedEvent);
     28    }, "Trusted DOMContentLoaded event");
    2629  });
    27 });
     30}, {capture: true, once: true});
     31
     32window.addEventListener("load", loadEvent => {
     33  let untrustedContentLoadedEvent;
     34  buttonElement.addEventListener("DOMContentLoaded", event => {
     35    untrustedContentLoadedEvent = event;
     36    test_contentLoaded_redispatching.step(() => {
     37      assert_false(untrustedContentLoadedEvent.isTrusted, "Redispatched DOMContentLoaded event shouldn't be trusted");
     38    });
     39    test_redispatching_of_dispatching_event.step(() => {
     40      assert_throws("InvalidStateError", () => {
     41        document.dispatchEvent(untrustedContentLoadedEvent);
     42      }, "Untrusted DOMContentLoaded event");
     43    });
     44  });
     45
     46  test_contentLoaded_redispatching.step(() => {
     47    assert_true(contentLoadedEvent.isTrusted, "Received DOMContentLoaded event should be trusted before redispatching");
     48    buttonElement.dispatchEvent(contentLoadedEvent);
     49    assert_false(contentLoadedEvent.isTrusted, "Received DOMContentLoaded event shouldn't be trusted after redispatching");
     50    assert_true(untrustedContentLoadedEvent !== undefined, "Untrusted DOMContentLoaded event should've been fired");
     51    test_contentLoaded_redispatching.done();
     52  });
     53}, {capture: true, once: true});
     54
     55async function testMouseUpAndClickEvent() {
     56  let mouseupEvent;
     57  buttonElement.addEventListener("mouseup", event => {
     58    mouseupEvent = event;
     59    test_mouseup_redispatching.step(() => {
     60      assert_true(mouseupEvent.isTrusted, "First mouseup event should be trusted");
     61    });
     62    test_redispatching_of_dispatching_event.step(() => {
     63      assert_throws("InvalidStateError", () => {
     64        buttonElement.dispatchEvent(mouseupEvent);
     65      }, "Trusted mouseup event");
     66    });
     67  }, {once: true});
     68
     69  let clickEvent;
     70  buttonElement.addEventListener("click", event => {
     71    clickEvent = event;
     72    test_mouseup_redispatching.step(() => {
     73      assert_true(clickEvent.isTrusted, "First click event should be trusted");
     74    });
     75    test_redispatching_of_dispatching_event.step(() => {
     76      assert_throws("InvalidStateError", function() {
     77        buttonElement.dispatchEvent(event);
     78      }, "Trusted click event");
     79    });
     80    buttonElement.addEventListener("mouseup", event => {
     81      test_mouseup_redispatching.step(() => {
     82        assert_false(event.isTrusted, "Redispatched mouseup event shouldn't be trusted");
     83      });
     84      test_redispatching_of_dispatching_event.step(() => {
     85        assert_throws("InvalidStateError", function() {
     86          buttonElement.dispatchEvent(event);
     87        }, "Untrusted mouseup event");
     88      });
     89    }, {once: true});
     90    function onClick() {
     91      test_mouseup_redispatching.step(() => {
     92        assert_true(false, "click event shouldn't be fired for dispatched mouseup event");
     93      });
     94    }
     95    test_mouseup_redispatching.step(() => {
     96      assert_true(mouseupEvent.isTrusted, "Received mouseup event should be trusted before redispatching from click event listener");
     97      buttonElement.addEventListener("click", onClick);
     98      buttonElement.dispatchEvent(mouseupEvent);
     99      buttonElement.removeEventListener("click", onClick);
     100      assert_false(mouseupEvent.isTrusted, "Received mouseup event shouldn't be trusted after redispatching");
     101      assert_true(clickEvent.isTrusted, "First click event should still be trusted even after redispatching mouseup event");
     102    });
     103  }, {once: true});
     104
     105  await waitForLoad;
     106  let bounds = buttonElement.getBoundingClientRect();
     107  test(() => { assert_true(true); }, `Synthesizing click on button... (button width / height: ${bounds.width} / ${bounds.height})`);
     108  new test_driver.Actions()
     109      .pointerMove(Math.floor(bounds.width / 5),
     110                   Math.floor(bounds.height / 2),
     111                   {origin: buttonElement})
     112      .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
     113      .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
     114      .send()
     115      .then(() => {
     116        test_mouseup_redispatching.step(() => {
     117          assert_true(clickEvent !== undefined, "mouseup and click events should've been fired");
     118        });
     119        test_mouseup_redispatching.done();
     120        test_redispatching_of_dispatching_event.done();
     121      }, (reason) => {
     122        test_mouseup_redispatching.step(() => {
     123          assert_true(false, `Failed to send mouse click due to ${reason}`);
     124        });
     125        test_mouseup_redispatching.done();
     126        test_redispatching_of_dispatching_event.done();
     127      });
     128}
     129testMouseUpAndClickEvent();
    28130</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log

    r248647 r253738  
    3434/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-omitted-capture.html
    3535/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements.html
     36/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-order-at-target.html
    3637/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-order.html
    3738/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-other-document.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg-expected.txt

    r222307 r253738  
    1 CONSOLE MESSAGE: line 87: TypeError: null is not an object (evaluating 'document.body.appendChild')
    2 CONSOLE MESSAGE: line 2237: TypeError: undefined is not an object (evaluating 'properties.output_document')
    3 #PID UNRESPONSIVE - com.apple.WebKit.WebContent.Development (pid 52955)
    4 FAIL: Timed out waiting for notifyDone to be called
    51
    6 #EOF
    7 #EOF
     2PASS new Document(): interfaces
     3PASS new Document(): children
     4PASS new Document(): metadata
     5PASS new Document(): characterSet aliases
     6
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt

    r249811 r253738  
    1212Item 1
    1313Item 2
     14Billing
     15Name
     16
     17Address
     18
     19Tab 1
     20Tab 2
     21Fruit
     22Delicious
     23Nutritious
     24Title
     25
     26Next
     27Content2
     28Content1
     29Parent
     30Child 1
     31Child 2
     32Light DOM Heading
     33
     34Light DOM text
     35
     36Light DOM text
     37
     38Delicious
     39Nutritious
     40
     41Misspelling
     42Wonderful
     43Fantastic
     44
    1445
    1546FAIL aria-activedescendant element reflection assert_equals: invalid ID for relationship returns null expected (object) null but got (undefined) undefined
     
    1950FAIL aria-errormessage assert_equals: expected (string) "errorMessage" but got (object) null
    2051FAIL aria-details assert_equals: expected (object) null but got (undefined) undefined
    21 FAIL Deleting a reflected element should return null for the IDL attribute and cause the content attribute to become stale. assert_equals: expected (object) Element node <div role="option" id="content-attr-element">Item 1</div> but got (undefined) undefined
    22 FAIL Changing the ID of an element causes the content attribute to become out of sync. assert_equals: expected (object) Element node <div role="option" id="original">Item 1</div> but got (undefined) undefined
    23 FAIL Reparenting an element into a descendant shadow scope nullifies the element reference. assert_equals: expected null but got Element node <div role="option" id="light-element">Hello world!</div>
     52FAIL Deleting a reflected element should return null for the IDL attribute and cause the content attribute to become stale. assert_equals: expected (object) Element node <div role="option" id="contentAttrElement">Item 1</div> but got (undefined) undefined
     53FAIL Changing the ID of an element causes the content attribute to become out of sync. assert_equals: expected (object) Element node <div role="option" id="changingIdElement">Item 1</div> but got (undefined) undefined
     54FAIL Reparenting an element into a descendant shadow scope nullifies the element reference. assert_equals: expected (string) "lightElement" but got (object) null
     55FAIL aria-labelledby. assert_array_equals: parsed content attribute sets element references. value is undefined, expected array
     56FAIL aria-controls. assert_array_equals: value is undefined, expected array
     57FAIL aria-describedby. assert_array_equals: value is undefined, expected array
     58FAIL aria-flowto. assert_array_equals: value is undefined, expected array
     59FAIL aria-owns. assert_array_equals: value is undefined, expected array
     60FAIL shadow DOM behaviour for FrozenArray element reflection. assert_equals: expected (object) null but got (undefined) undefined
     61FAIL Moving explicitly set elements across shadow DOM boundaries. assert_equals: expected (string) "buttonDescription1 buttonDescription2" but got (object) null
     62FAIL Moving explicitly set elements around within the same scope, and removing from the DOM. assert_array_equals: aria-labeled by is supported by IDL getter. value is undefined, expected array
    2463
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html

    r249811 r253738  
    99    <script src="/resources/testharnessreport.js"></script>
    1010  </head>
     11
    1112  <div id="activedescendant" aria-activedescendant="x"></div>
    1213
    13   <div id="parent-listbox" role="listbox" aria-activedescendant="i1">
     14  <div id="parentListbox" role="listbox" aria-activedescendant="i1">
    1415    <div role="option" id="i1">Item 1</div>
    1516    <div role="option" id="i2">Item 2</div>
     
    1819  <script>
    1920  test(function(t) {
    20     const ancestor = document.getElementById("parent-listbox");
    2121    assert_equals(activedescendant.ariaActiveDescendantElement, null,
    2222                  "invalid ID for relationship returns null");
    2323
    24     const descendant1 = document.getElementById("i1");
    25     const descendant2 = document.getElementById("i2");
    26 
    2724    // Element reference should be set if the content attribute was included.
    28     assert_equals(ancestor.getAttribute("aria-activedescendant"), "i1", "check content attribute after parsing.");
    29     assert_equals(ancestor.ariaActiveDescendantElement, i1, "check idl attribute after parsing.");
     25    assert_equals(parentListbox.getAttribute("aria-activedescendant"), "i1", "check content attribute after parsing.");
     26    assert_equals(parentListbox.ariaActiveDescendantElement, i1, "check idl attribute after parsing.");
    3027
    3128    // If we set the content attribute, the element reference should reflect this.
    32     ancestor.setAttribute("aria-activedescendant", "i2");
    33     assert_equals(ancestor.ariaActiveDescendantElement, descendant2, "setting the content attribute updates the element reference.");
     29    parentListbox.setAttribute("aria-activedescendant", "i2");
     30    assert_equals(parentListbox.ariaActiveDescendantElement, i2, "setting the content attribute updates the element reference.");
    3431
    3532    // Setting the element reference should be reflected in the content attribute.
    36     ancestor.ariaActiveDescendantElement = descendant1;
    37     assert_equals(ancestor.ariaActiveDescendantElement, descendant1, "getter should return the right element reference.");
    38     assert_equals(ancestor.getAttribute("aria-activedescendant"), "i1", "content attribute should reflect the element reference.");
     33    parentListbox.ariaActiveDescendantElement = i1;
     34    assert_equals(parentListbox.ariaActiveDescendantElement, i1, "getter should return the right element reference.");
     35    assert_equals(parentListbox.getAttribute("aria-activedescendant"), "i1", "content attribute should reflect the element reference.");
    3936
    4037    // Both content and IDL attribute should be nullable.
    41     ancestor.ariaActiveDescendantElement = null;
    42     assert_equals(ancestor.ariaActiveDescendantElement, null);
    43     assert_false(ancestor.hasAttribute("aria-activedescendant"));
    44     assert_equals(ancestor.getAttribute("aria-activedescendant"), null, "nullifying the idl attribute removes the content attribute.");
     38    parentListbox.ariaActiveDescendantElement = null;
     39    assert_equals(parentListbox.ariaActiveDescendantElement, null);
     40    assert_false(parentListbox.hasAttribute("aria-activedescendant"));
     41    assert_equals(parentListbox.getAttribute("aria-activedescendant"), null, "nullifying the idl attribute removes the content attribute.");
    4542
    4643    // Setting content attribute to non-existent or non compatible element should nullify the IDL attribute.
    4744    // Reset the element to an existant one.
    48     ancestor.setAttribute("aria-activedescendant", "i1");
    49     assert_equals(ancestor.ariaActiveDescendantElement, i1, "reset attribute.");
    50 
    51     ancestor.setAttribute("aria-activedescendant", "non-existent-element");
    52     assert_equals(ancestor.getAttribute("aria-activedescendant"), "non-existent-element");
    53     assert_equals(ancestor.ariaActiveDescendantElement, null,"non-DOM content attribute should null the element reference");
     45    parentListbox.setAttribute("aria-activedescendant", "i1");
     46    assert_equals(parentListbox.ariaActiveDescendantElement, i1, "reset attribute.");
     47
     48    parentListbox.setAttribute("aria-activedescendant", "non-existent-element");
     49    assert_equals(parentListbox.getAttribute("aria-activedescendant"), "non-existent-element");
     50    assert_equals(parentListbox.ariaActiveDescendantElement, null,"non-DOM content attribute should null the element reference");
    5451  }, "aria-activedescendant element reflection");
    5552  </script>
    5653
    57   <div id="parent-listbox-2" role="listbox" aria-activedescendant="option1">
     54  <div id="parentListbox2" role="listbox" aria-activedescendant="option1">
    5855    <div role="option" id="option1">Item 1</div>
    5956    <div role="option" id="option2">Item 2</div>
     
    6259  <script>
    6360  test(function(t) {
    64     const ancestor = document.getElementById("parent-listbox-2");
    6561    const option1 = document.getElementById("option1");
    6662    const option2 = document.getElementById("option2");
    67     assert_equals(ancestor.ariaActiveDescendantElement, option1);
    68 
     63    assert_equals(parentListbox2.ariaActiveDescendantElement, option1);
    6964    option1.removeAttribute("id");
    7065    option2.setAttribute("id", "option1");
     
    7267    assert_equals(option2, option2Duplicate);
    7368
    74     assert_equals(ancestor.ariaActiveDescendantElement, option2);
     69    assert_equals(parentListbox2.ariaActiveDescendantElement, option2);
    7570  }, "If the content attribute is set directly, the IDL attribute getter always returns the first element whose ID matches the content attribute.");
    7671  </script>
    7772
    78   <div id="blank-id-parent" role="listbox">
     73  <div id="blankIdParent" role="listbox">
    7974    <div role="option" id="multiple-id"></div>
    8075    <div role="option" id="multiple-id"></div>
     
    8378  <script>
    8479  test(function(t) {
    85     const ancestor = document.getElementById("blank-id-parent");
    86 
    8780    // Get second child of parent. This violates the setting of a reflected element
    8881    // as it will not be the first child of the parent with that ID, which should
    8982    // result in an empty string for the content attribute.
    90     ancestor.ariaActiveDescendantElement = ancestor.children[1];
    91     assert_true(ancestor.hasAttribute("aria-activedescendant"));
    92     assert_equals(ancestor.getAttribute("aria-activedescendant"), "");
    93     assert_equals(ancestor.ariaActiveDescendantElement, ancestor.children[1]);
     83    blankIdParent.ariaActiveDescendantElement = blankIdParent.children[1];
     84    assert_true(blankIdParent.hasAttribute("aria-activedescendant"));
     85    assert_equals(blankIdParent.getAttribute("aria-activedescendant"), "");
     86    assert_equals(blankIdParent.ariaActiveDescendantElement, blankIdParent.children[1]);
    9487  }, "Setting the IDL attribute to an element which is not the first element in DOM order with its ID causes the content attribute to be an empty string");
    9588  </script>
    9689
    97   <div id="outer-container">
    98     <p id="light-paragraph">Hello world!</p>
    99     <span class="shadow-host">
     90  <div id="outerContainer">
     91    <p id="lightParagraph">Hello world!</p>
     92    <span id="shadowHost">
    10093    </span>
    10194  </div>
     
    10396  <script>
    10497  test(function(t) {
    105     const shadowElement = document.querySelector(".shadow-host");
    106     const shadow = shadowElement.attachShadow({mode: "open"});
     98    const shadow = shadowHost.attachShadow({mode: "open"});
    10799    const link = document.createElement("a");
    108100    shadow.appendChild(link);
    109101
    110     const lightPara = document.getElementById("light-paragraph");
    111     assert_equals(lightPara.ariaActiveDescendantElement, null);
     102    assert_equals(lightParagraph.ariaActiveDescendantElement, null);
    112103
    113104    // The given element crosses a shadow dom boundary, so it cannot be
    114105    // set as an element reference.
    115     lightPara.ariaActiveDescendantElement = link;
    116     assert_equals(lightPara.ariaActiveDescendantElement, null);
     106    lightParagraph.ariaActiveDescendantElement = link;
     107    assert_equals(lightParagraph.ariaActiveDescendantElement, null);
    117108
    118109    // The given element crosses a shadow dom boundary (upwards), so
    119110    // can be used as an element reference, but the content attribute
    120111    // should reflect the empty string.
    121     link.ariaActiveDescendantElement = lightPara;
    122     assert_equals(link.ariaActiveDescendantElement, lightPara);
     112    link.ariaActiveDescendantElement = lightParagraph;
     113    assert_equals(link.ariaActiveDescendantElement, lightParagraph);
    123114    assert_equals(link.getAttribute("aria-activedescendant"), "");
    124115  }, "Setting an element reference that crosses into a shadow tree is disallowed, but setting one that is in a shadow inclusive ancestor is allowed.");
     
    130121  <script>
    131122  test(function(t) {
    132     const inputElement = document.getElementById("startTime");
    133     const errorMessage = document.getElementById("errorMessage");
    134 
    135     inputElement.ariaErrorMessageElement = errorMessage;
    136     assert_equals(inputElement.getAttribute("aria-errormessage"), "errorMessage");
    137 
    138     inputElement.ariaErrorMessageElement = null;
    139     assert_equals(inputElement.ariaErrorMessageElement, null, "blah");
    140     assert_false(inputElement.hasAttribute("aria-errormessage"));
    141 
    142     inputElement.setAttribute("aria-errormessage", "errorMessage");
    143     assert_equals(inputElement.ariaErrorMessageElement, errorMessage);
     123    startTime.ariaErrorMessageElement = errorMessage;
     124    assert_equals(startTime.getAttribute("aria-errormessage"), "errorMessage");
     125
     126    startTime.ariaErrorMessageElement = null;
     127    assert_equals(startTime.ariaErrorMessageElement, null, "blah");
     128    assert_false(startTime.hasAttribute("aria-errormessage"));
     129
     130    startTime.setAttribute("aria-errormessage", "errorMessage");
     131    assert_equals(startTime.ariaErrorMessageElement, errorMessage);
    144132
    145133  }, "aria-errormessage");
     
    149137  <label>
    150138    Password:
    151     <input id="password-field" type="password" aria-details="pw">
     139    <input id="passwordField" type="password" aria-details="pw">
    152140  </label>
    153141
    154142  <ul>
    155     <li id="list-item-1">First description.</li>
    156     <li id="list-item-2">Second description.</li>
     143    <li id="listItem1">First description.</li>
     144    <li id="listItem2">Second description.</li>
    157145  </ul>
    158146
     
    160148
    161149  test(function(t) {
    162     const inputElement = document.getElementById("password-field");
    163     const ul1 = document.getElementById("list-item-1");
    164     const ul2 = document.getElementById("list-item-2");
    165 
    166     assert_equals(inputElement.ariaDetailsElement, null);
    167     inputElement.ariaDetailsElement = ul1;
    168     assert_equals(inputElement.getAttribute("aria-details"), "list-item-1");
    169 
    170     inputElement.ariaDetailsElement = ul2;
    171     assert_equals(inputElement.getAttribute("aria-details"), "list-item-2");
     150    assert_equals(passwordField.ariaDetailsElement, null);
     151    passwordField.ariaDetailsElement = listItem1;
     152    assert_equals(passwordField.getAttribute("aria-details"), "listItem1");
     153
     154    passwordField.ariaDetailsElement = listItem2;
     155    assert_equals(passwordField.getAttribute("aria-details"), "listItem2");
    172156  }, "aria-details");
    173157  </script>
    174158
    175   <div id="old-parent" role="listbox" aria-activedescendant="content-attr-element">
    176     <div role="option" id="content-attr-element">Item 1</div>
    177     <div role="option" id="idl-attr-element">Item 2</div>
    178   </div>
    179 
    180   <script>
    181 
    182   test(function(t) {
    183     const deletionParent = document.getElementById("old-parent");
    184 
    185     const descendant1 = document.getElementById("content-attr-element");
    186     const descendant2 = document.getElementById("idl-attr-element");
     159  <div id="deletionParent" role="listbox" aria-activedescendant="contentAttrElement">
     160    <div role="option" id="contentAttrElement">Item 1</div>
     161    <div role="option" id="idlAttrElement">Item 2</div>
     162  </div>
     163
     164  <script>
     165
     166  test(function(t) {
     167    const idlAttrElement = document.getElementById("idlAttrElement");
     168
     169    assert_equals(deletionParent.getAttribute("aria-activedescendant"), "contentAttrElement");
     170    assert_equals(deletionParent.ariaActiveDescendantElement, contentAttrElement);
    187171
    188172    // Deleting an element set via the content attribute.
    189     assert_equals(deletionParent.getAttribute("aria-activedescendant"), "content-attr-element");
    190     assert_equals(deletionParent.ariaActiveDescendantElement, descendant1);
    191 
    192     deletionParent.removeChild(descendant1);
    193     assert_equals(deletionParent.getAttribute("aria-activedescendant"), "content-attr-element");
     173    deletionParent.removeChild(contentAttrElement);
     174    assert_equals(deletionParent.getAttribute("aria-activedescendant"), "contentAttrElement");
     175
     176    // As it was not explitly set, the attr-associated-element is computed from the content attribute,
     177    // and since descendant1 has been removed from the DOM, it is not valid.
    194178    assert_equals(deletionParent.ariaActiveDescendantElement, null);
    195179
    196180    // Deleting an element set via the IDL attribute.
    197     deletionParent.ariaActiveDescendantElement = descendant2;
    198     assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idl-attr-element");
    199 
    200     deletionParent.removeChild(descendant2);
    201     assert_equals(deletionParent.ariaActiveDescendantElement, null);
     181    deletionParent.ariaActiveDescendantElement = idlAttrElement;
     182    assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
     183
     184    // The element is still retrieved because it was explicitly set, and was at that point
     185    // in a valid scope.
     186    deletionParent.removeChild(idlAttrElement);
     187    assert_equals(deletionParent.ariaActiveDescendantElement, idlAttrElement);
    202188
    203189    // The content attribute will still reflect the id.
    204     assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idl-attr-element");
     190    assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
    205191  }, "Deleting a reflected element should return null for the IDL attribute and cause the content attribute to become stale.");
    206192  </script>
    207193
    208   <div id="parent" role="listbox" aria-activedescendant="original">
    209     <div role="option" id="original">Item 1</div>
    210     <div role="option" id="element-with-persistant-id">Item 2</div>
    211   </div>
    212 
    213   <script>
    214   test(function(t) {
    215     const parentNode = document.getElementById("parent");
    216     const changingIdElement = document.getElementById("original");
    217     const persistantIDElement = document.getElementById("element-with-persistant-id");
    218 
     194  <div id="parentNode" role="listbox" aria-activedescendant="changingIdElement">
     195    <div role="option" id="changingIdElement">Item 1</div>
     196    <div role="option" id="persistantIDElement">Item 2</div>
     197  </div>
     198
     199  <script>
     200  test(function(t) {
     201    const changingIdElement = document.getElementById("changingIdElement");
    219202    assert_equals(parentNode.ariaActiveDescendantElement, changingIdElement);
    220203
     
    224207    // The content attribute still reflects the old id, and we expect the
    225208    // Element reference to be null as there is no DOM node with id "original"
    226     assert_equals(parentNode.getAttribute("aria-activedescendant"), "original");
     209    assert_equals(parentNode.getAttribute("aria-activedescendant"), "changingIdElement");
    227210    assert_equals(parentNode.ariaActiveDescendantElement, null, "Element set via content attribute with a changed id will return null on getting");
    228211
     
    239222  </script>
    240223
    241   <div id="light-parent" role="listbox">
    242     <div role="option" id="light-element">Hello world!</div>
    243   </div>
    244   <div id="shadowHost"></div>
    245 
    246   <script>
    247   test(function(t) {
    248     const shadowElement = document.getElementById("shadowHost");
    249     const shadowHost = shadowElement.attachShadow({mode: "open"});
    250     const lightParent = document.getElementById("light-parent");
    251     const optionElement = document.getElementById("light-element");
    252 
    253     lightParent.ariaActiveDescendantElement = optionElement;
    254     assert_equals(lightParent.ariaActiveDescendantElement, optionElement);
    255 
    256     // Move the referenced element into shadow DOM.
    257     shadowHost.appendChild(optionElement);
    258     assert_equals(lightParent.ariaActiveDescendantElement, null);
    259     assert_equals(lightParent.getAttribute("aria-activedescendant"), "light-element");
     224  <div id="lightParent" role="listbox">
     225    <div role="option" id="lightElement">Hello world!</div>
     226  </div>
     227  <div id="shadowHostElement"></div>
     228
     229  <script>
     230  test(function(t) {
     231    const lightElement = document.getElementById("lightElement");
     232    const shadowRoot = shadowHostElement.attachShadow({mode: "open"});
     233
     234    lightParent.ariaActiveDescendantElement = lightElement;
     235    assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
     236
     237    // Move the referenced element into shadow DOM. As it was explicitly set,
     238    // it is still able to be gotten even though it is in a different scope.
     239    shadowRoot.appendChild(lightElement);
     240    assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
     241    assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
    260242
    261243    // Move the referenced element back into light DOM.
    262     lightParent.appendChild(optionElement);
    263     assert_equals(lightParent.ariaActiveDescendantElement, optionElement);
     244    lightParent.appendChild(lightElement);
     245    assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
     246    assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
    264247  }, "Reparenting an element into a descendant shadow scope nullifies the element reference.");
    265248  </script>
     249
     250  <div id="billingElement">Billing</div>
     251  <div>
     252      <div id="nameElement">Name</div>
     253      <input type="text" id="input1" aria-labelledby="billingElement nameElement"/>
     254  </div>
     255  <div>
     256      <div id="addressElement">Address</div>
     257      <input type="text" id="input2"/>
     258  </div>
     259
     260  <script>
     261  test(function(t) {
     262    const billingElement = document.getElementById("billingElement")
     263    assert_array_equals(input1.ariaLabelledByElements, [billingElement, nameElement], "parsed content attribute sets element references.");
     264    assert_equals(input2.ariaLabelledByElements, null, "Testing empty content attribute after parsing.");
     265
     266    input2.ariaLabelledByElements = [billingElement, addressElement];
     267    assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement], "Testing IDL setter/getter.");
     268    assert_equals(input2.getAttribute("aria-labelledby"), "billingElement addressElement");
     269
     270    // Remove the element from the DOM, but as it was explicitly set whilst in a valid scope
     271    // it can still be retrieved.
     272    billingElement.remove();
     273    assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement]);
     274
     275    input2.ariaLabelledByElements = [];
     276    assert_array_equals(input2.ariaLabelledByElements, [], "Testing IDL setter/getter for empty array.");
     277    assert_equals(input2.getAttribute("aria-labelledby"), "");
     278
     279    input1.removeAttribute("aria-labelledby");
     280    assert_equals(input1.ariaLabelledByElements, null);
     281
     282    input1.setAttribute("aria-labelledby", "nameElement addressElement");
     283    assert_array_equals(input1.ariaLabelledByElements, [nameElement, addressElement]);
     284
     285    input1.ariaLabelledByElements = null;
     286    assert_false(input1.hasAttribute("aria-labelledby", "Nullifying the IDL attribute should remove the content attribute."));
     287  }, "aria-labelledby.");
     288  </script>
     289
     290  <ul role="tablist">
     291    <li role="presentation"><a id="link1" role="tab" aria-controls="panel1">Tab 1</a></li>
     292    <li role="presentation"><a id="link2" role="tab">Tab 2</a></li>
     293  </ul>
     294
     295  <div role="tabpanel" id="panel1"></div>
     296  <div role="tabpanel" id="panel2"></div>
     297
     298  <script>
     299  test(function(t) {
     300    assert_array_equals(link1.ariaControlsElements, [panel1]);
     301    assert_equals(link2.ariaControlsElements, null);
     302
     303    link2.setAttribute("aria-controls", "panel1 panel2");
     304    assert_array_equals(link2.ariaControlsElements, [panel1, panel2]);
     305
     306    link1.ariaControlsElements = [];
     307    assert_equals(link1.getAttribute("aria-controls"), "");
     308
     309    link2.ariaControlsElements = [panel1, panel2];
     310    assert_equals(link2.getAttribute("aria-controls"), "panel1 panel2");
     311
     312    link2.removeAttribute("aria-controls");
     313    assert_equals(link2.ariaControlsElements, null);
     314
     315    link2.ariaControlsElements = [panel1, panel2];
     316    assert_equals(link2.getAttribute("aria-controls"), "panel1 panel2");
     317
     318    link2.ariaControlsElements = null;
     319    assert_false(link2.hasAttribute("aria-controls", "Nullifying the IDL attribute should remove the content attribute."));
     320  }, "aria-controls.");
     321  </script>
     322
     323  <a id="describedLink" aria-describedby="description1 description2">Fruit</a>
     324  <div id="description1">Delicious</div>
     325  <div id="description2">Nutritious</div>
     326
     327  <script>
     328  test(function(t) {
     329    assert_array_equals(describedLink.ariaDescribedByElements, [description1, description2]);
     330
     331    describedLink.ariaDescribedByElements = [description1, description2];
     332    assert_equals(describedLink.getAttribute("aria-describedby"), "description1 description2");
     333
     334    describedLink.ariaDescribedByElements = [];
     335    assert_equals(describedLink.getAttribute("aria-describedby"), "");
     336
     337    describedLink.setAttribute("aria-describedby", "description1");
     338    assert_array_equals(describedLink.ariaDescribedByElements, [description1]);
     339
     340    describedLink.removeAttribute("aria-describedby");
     341    assert_equals(describedLink.ariaDescribedByElements, null);
     342
     343    describedLink.ariaDescribedByElements = [description1, description2];
     344    assert_equals(describedLink.getAttribute("aria-describedby"), "description1 description2");
     345
     346    describedLink.ariaDescribedByElements = null;
     347    assert_false(describedLink.hasAttribute("aria-describedby", "Nullifying the IDL attribute should remove the content attribute."));
     348  }, "aria-describedby.");
     349  </script>
     350
     351  <h2 id="titleHeading" aria-flowto="article1 article2">Title</h2>
     352  <div>Next</div>
     353  <article id="article2">Content2</article>
     354  <article id="article1">Content1</article>
     355
     356  <script>
     357  test(function(t) {
     358    const article1 = document.getElementById("article1");
     359    const article2 = document.getElementById("article2");
     360
     361    assert_array_equals(titleHeading.ariaFlowToElements, [article1, article2]);
     362
     363    titleHeading.ariaFlowToElements = [article1, article2];
     364    assert_equals(titleHeading.getAttribute("aria-flowto"), "article1 article2");
     365
     366    titleHeading.ariaFlowToElements = [];
     367    assert_equals(titleHeading.getAttribute("aria-flowto"), "");
     368
     369    titleHeading.setAttribute("aria-flowto", "article1");
     370    assert_array_equals(titleHeading.ariaFlowToElements, [article1]);
     371
     372    titleHeading.removeAttribute("aria-flowto");
     373    assert_equals(titleHeading.ariaFlowToElements, null);
     374
     375    titleHeading.ariaFlowToElements = [article1, article2];
     376    assert_equals(titleHeading.getAttribute("aria-flowto"), "article1 article2");
     377
     378    titleHeading.ariaFlowToElements = null;
     379    assert_false(titleHeading.hasAttribute("aria-flowto", "Nullifying the IDL attribute should remove the content attribute."));
     380  }, "aria-flowto.");
     381  </script>
     382
     383  <ul>
     384    <li id="listItemOwner" aria-owns="child1 child2">Parent</li>
     385  </ul>
     386  <ul>
     387    <li id="child1">Child 1</li>
     388    <li id="child2">Child 2</li>
     389  </ul>
     390  <script>
     391  test(function(t) {
     392    assert_array_equals(listItemOwner.ariaOwnsElements, [child1, child2]);
     393
     394    listItemOwner.removeAttribute("aria-owns");
     395    assert_equals(listItemOwner.ariaOwnsElements, null);
     396
     397    listItemOwner.ariaOwnsElements = [child1, child2];
     398    assert_equals(listItemOwner.getAttribute("aria-owns"), "child1 child2");
     399
     400    listItemOwner.ariaOwnsElements = [];
     401    assert_equals(listItemOwner.getAttribute("aria-owns"), "");
     402
     403    listItemOwner.setAttribute("aria-owns", "child1");
     404    assert_array_equals(listItemOwner.ariaOwnsElements, [child1]);
     405
     406    listItemOwner.ariaOwnsElements = [child1, child2];
     407    assert_equals(listItemOwner.getAttribute("aria-owns"), "child1 child2");
     408
     409    listItemOwner.ariaOwnsElements = null;
     410    assert_false(listItemOwner.hasAttribute("aria-owns", "Nullifying the IDL attribute should remove the content attribute."));
     411  }, "aria-owns.");
     412  </script>
     413
     414  <div id="lightDomContainer">
     415    <h2 id="lightDomHeading" aria-flowto="shadowChild1 shadowChild2">Light DOM Heading</h2>
     416    <div id="host"></div>
     417    <p id="lightDomText1">Light DOM text</p>
     418    <p id="lightDomText2">Light DOM text</p>
     419  </div>
     420
     421  <script>
     422  test(function(t) {
     423    const shadowRoot = host.attachShadow({mode: "open"});
     424    const shadowChild1 = document.createElement("article");
     425    shadowChild1.setAttribute("id", "shadowChild1");
     426    shadowRoot.appendChild(shadowChild1);
     427    const shadowChild2 = document.createElement("article");
     428    shadowChild2.setAttribute("id", "shadowChild1");
     429    shadowRoot.appendChild(shadowChild2);
     430
     431    // The elements in the content attribute are in a "darker" tree - they
     432    // enter a shadow encapsulation boundary, so not be associated any more.
     433    assert_equals(lightDomHeading.ariaFlowToElements, null);
     434
     435    // These elements are in a shadow including ancestor, i.e "lighter" tree.
     436    // Valid for the IDL attribute, but content attribute should be null.
     437    shadowChild1.ariaFlowToElements = [lightDomText1, lightDomText2];
     438    assert_equals(shadowChild1.getAttribute("aria-flowto"), "", "empty content attribute for elements that cross shadow boundaries.");
     439
     440    // These IDs belong to a different scope, so the attr-associated-element
     441    // cannot be computed.
     442    shadowChild2.setAttribute("aria-flowto", "lightDomText1 lightDomText2");
     443    assert_equals(shadowChild2.ariaFlowToElements, null);
     444
     445    // Elements that cross into shadow DOM are dropped, only reflect the valid
     446    // elements in IDL and in the content attribute.
     447    lightDomHeading.ariaFlowToElements = [shadowChild1, shadowChild2, lightDomText1, lightDomText2];
     448    assert_array_equals(lightDomHeading.ariaFlowToElements, [lightDomText1, lightDomText2]);
     449    assert_equals(lightDomHeading.getAttribute("aria-flowto"), "lightDomText1 lightDomText2", "empty content attribute if any given elements cross shadow boundaries");
     450
     451    // Using a mixture of elements in the same scope and in a shadow including
     452    // ancestor should set the IDL attribute, but should reflect the empty
     453    // string in the content attribute.
     454    shadowChild1.removeAttribute("aria-flowto");
     455    shadowChild1.ariaFlowToElements = [shadowChild1, lightDomText1];
     456    assert_equals(shadowChild1.getAttribute("aria-flowto"), "", "Setting IDL elements with a mix of scopes should reflect an empty string in the content attribute")
     457
     458  }, "shadow DOM behaviour for FrozenArray element reflection.");
     459  </script>
     460
     461  <div id="describedButtonContainer">
     462    <div id="buttonDescription1">Delicious</div>
     463    <div id="buttonDescription2">Nutritious</div>
     464    <div id="outerShadowHost"></div>
     465  </div>
     466
     467  <script>
     468  test(function(t) {
     469    const description1 = document.getElementById("buttonDescription1");
     470    const description2 = document.getElementById("buttonDescription2");
     471    const outerShadowRoot = outerShadowHost.attachShadow({mode: "open"});
     472    const innerShadowHost = document.createElement("div");
     473    outerShadowRoot.appendChild(innerShadowHost);
     474    const innerShadowRoot = innerShadowHost.attachShadow({mode: "open"});
     475
     476    // Create an element, add some attr associated light DOM elements and append it to the outer shadow root.
     477    const describedElement = document.createElement("button");
     478    describedButtonContainer.appendChild(describedElement);
     479    describedElement.ariaDescribedByElements = [description1, description2];
     480
     481    // All elements were in the same scope, so elements are gettable and the content attribute reflects the ids.
     482    assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
     483    assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
     484
     485    outerShadowRoot.appendChild(describedElement);
     486
     487    // Explicitly set attr-associated-elements should still be gettable because we are referencing elements in a lighter scope.
     488    // The content attr still reflects the ids from the explicit elements because they were in a valid scope at the time of setting.
     489    assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
     490    assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
     491
     492    // Move the explicitly set elements into a deeper shadow DOM to test the relationship should not be gettable.
     493    innerShadowRoot.appendChild(description1);
     494    innerShadowRoot.appendChild(description2);
     495
     496    // Explicitly set elements are still retrieved, because they were in a valid scope when they were set.
     497    // The content attribute still reflects the ids.
     498    assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
     499    assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
     500
     501    // Move into the same shadow scope as the explicitly set elements to test that the elements are gettable
     502    // and reflect the correct IDs onto the content attribute.
     503    innerShadowRoot.appendChild(describedElement);
     504    assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
     505    assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
     506  }, "Moving explicitly set elements across shadow DOM boundaries.");
     507  </script>
     508
     509  <div id="sameScopeContainer">
     510    <div id="labeledby" aria-labeledby="headingLabel1 headingLabel2">Misspelling</div>
     511    <div id="headingLabel1">Wonderful</div>
     512    <div id="headingLabel2">Fantastic</div>
     513
     514    <div id="headingShadowHost"></div>
     515  </div>
     516
     517    <script>
     518    test(function(t) {
     519      const shadowRoot = headingShadowHost.attachShadow({mode: "open"});
     520      const headingElement = document.createElement("h1");
     521      const headingLabel1 = document.getElementById("headingLabel1")
     522      const headingLabel2 = document.getElementById("headingLabel2")
     523      shadowRoot.appendChild(headingElement);
     524
     525      assert_array_equals(labeledby.ariaLabelledByElements, [headingLabel1, headingLabel2], "aria-labeled by is supported by IDL getter.");
     526
     527      // Explicitly set elements are in a lighter shadow DOM, so that's ok.
     528      headingElement.ariaLabelledByElements = [headingLabel1, headingLabel2];
     529      assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Lighter elements are gettable when explicitly set.");
     530      assert_equals(headingElement.getAttribute("aria-labelledby"), "", "Crosses shadow DOM boundary, so content attribute should be empty string.");
     531
     532      // Move into Light DOM, explicitly set elements should still be gettable.
     533      // Note that the content attribute still reflects the element ids - when scope changes it becomes stale.
     534      sameScopeContainer.appendChild(headingElement);
     535      assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Elements are all in same scope, so gettable.");
     536      assert_equals(headingElement.getAttribute("aria-labelledby"), "", "Content attribute is empty, as on setting the explicitly set elements they were in a different scope.");
     537
     538      // Reset the association, to update the content attribute.
     539      headingElement.ariaLabelledByElements = [headingLabel1, headingLabel2];
     540      assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2", "Elements are set again, so the content attribute is updated.");
     541
     542      // Remove the referring element from the DOM, elements are gettable.
     543      headingElement.remove();
     544      assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Element is no longer in the document, but references should be gettable.");
     545      assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
     546
     547      // Insert it back in.
     548      sameScopeContainer.appendChild(headingElement);
     549      assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
     550      assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
     551
     552      // Remove everything from the DOM, everything is still gettable.
     553      headingLabel1.remove();
     554      headingLabel2.remove();
     555      assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
     556      assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
     557      assert_equals(document.getElementById("headingLabel1"), null);
     558      assert_equals(document.getElementById("headingLabel2"), null);
     559
     560      // Reset the association to update the content attribute.
     561      headingElement.ariaLabelledByElements = [headingLabel1, headingLabel2];
     562      assert_array_equals(headingElement.ariaLabelledByElements, []);
     563      assert_equals(headingElement.getAttribute("aria-labelledby"), "");
     564    }, "Moving explicitly set elements around within the same scope, and removing from the DOM.");
     565    </script>
     566
     567  <input id="input">
     568    <optgroup>
     569      <option id="first">First option</option>
     570      <option id="second">Second option</option>
     571    </optgroup>
     572
     573  <script>
     574    test(function(t) {
     575      input.ariaActiveDescendantElement = first;
     576      first.parentElement.appendChild(first);
     577
     578      // This behaviour is currently under discussion by WHATWG.
     579      // See: https://github.com/whatwg/html/pull/3917#issuecomment-527263562
     580      assert_equals(input.ariaActiveDescendantElement, first);
     581    }, "Reparenting.");
    266582</html>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log

    r249811 r253738  
    127127/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-document.html
    128128/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-inner-outer.html
     129/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-sanity.html
    129130/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-takeRecords.html
    130131/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-appendChild.html
     
    170171/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Text-constructor.html
    171172/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Text-splitText.html
     173/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/adoption.window.js
    172174/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/append-on-Document.html
     175/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-attribute-reflection.tentative.html
    173176/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html
    174177/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html
     
    217220/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/query-target-in-load-event.html
    218221/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/query-target-in-load-event.part.html
    219 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-and-adopt-crash.html
     222/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-and-adopt-thcrash.html
    220223/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/remove-unscopable.html
    221224/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/rootNode.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log

    r249811 r253738  
    2222/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js
    2323/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html
     24/LayoutTests/imported/w3c/web-platform-tests/dom/svg-insert-crash.html
Note: See TracChangeset for help on using the changeset viewer.