0
Files
src/third_party/blink/web_tests/shadow-dom/gethtml-use-counter.html
Mason Freed 9ab453c8e7 Adjust getHTML behavior to match recent consensus
This includes two changes:

1. Rename includeShadowRoots to serializableShadowRoots
2. Do not throw an exception if serializableShadowRoots is false
   but shadowRoots is non-empty.

I also added IDL defaults for both parameters to clean up the C++.
I also added a test of the use counter for getHTML().

Bug: 41490936
Change-Id: Ieedd81b5165d9652c3a7b68dea4a4fa5fb088560
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5304121
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262930}
2024-02-20 21:54:16 +00:00

14 lines
461 B
HTML

<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body>
<script>
test(() => {
const kElementGetHTML = 4781; // From web_feature.mojom
assert_false(internals.isUseCounted(document, kElementGetHTML));
document.body.getHTML({serializableShadowRoots: true});
assert_true(internals.isUseCounted(document, kElementGetHTML));
}, 'Use of getHTML is use counted.');
</script>