Skip to content

Commit

Permalink
Bug 1812374 [wpt PR 38174] - WebKit export of https://bugs.webkit.org…
Browse files Browse the repository at this point in the history
…/show_bug.cgi?id=251097, a=testonly

Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=251097 (#38174)

--

wpt-commits: 98b366f4fb8550615367ee22358108738c6bdf0a
wpt-pr: 38174
  • Loading branch information
shvaikalesh authored and moz-wptsync-bot committed Feb 1, 2023
1 parent 4563541 commit 9bf5cee
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,27 @@
container.innerHTML = '<fieldset disabled><my-control>';
assert_array_equals(container.querySelector('my-control').disabledHistory(), [true]);
}, 'Upgrading an element with disabled content attribute');

test(() => {
const container = document.createElement('div');
document.body.appendChild(container);
container.innerHTML = '<fieldset disabled><my-control></my-control></fieldset>';

const control = container.querySelector('my-control');
control.setAttribute('disabled', '');
control.removeAttribute('disabled');
assert_array_equals(control.disabledHistory(), [true]);
}, 'Toggling "disabled" attribute on a custom element inside disabled <fieldset> does not trigger a callback');

test(() => {
const container = document.createElement('div');
document.body.appendChild(container);
container.innerHTML = '<fieldset><my-control disabled></my-control></fieldset>';

const fieldset = container.firstElementChild;
fieldset.disabled = true;
fieldset.disabled = false;
assert_array_equals(container.querySelector('my-control').disabledHistory(), [true]);
}, 'Toggling "disabled" attribute on a <fieldset> does not trigger a callback on disabled custom element descendant');
</script>
</body>

0 comments on commit 9bf5cee

Please sign in to comment.