Skip to content

Commit 71e7aa5

Browse files
authored
Merge pull request #1146 from lightpanda-io/test_normalized_text_nodes
add a test for the changes to parsing adjascent text ndoes
2 parents 2e435f5 + 859b03c commit 71e7aa5

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/tests/dom/node.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,22 @@
224224
testing.expectEqual(6, Node.ENTITY_NODE);
225225
testing.expectEqual(12, Node.NOTATION_NODE);
226226
</script>
227+
228+
<span id=token class="token" style="color:#ce9178">&quot;puppeteer &quot;</span>
229+
<h3 id=name>Leto
230+
<!-- -->
231+
<!-- -->
232+
Atreides</h3>
233+
<script id=normalize>
234+
const token = $('#token');
235+
testing.expectEqual('"puppeteer "', token.firstChild.nodeValue);
236+
237+
const name = $('#name');
238+
testing.expectEqual([
239+
"Leto\n ",
240+
" ",
241+
"\n ",
242+
" ",
243+
"\n Atreides"
244+
], Array.from(name.childNodes).map((n) => n.nodeValue));
245+
</script>

vendor/netsurf/libdom

vendor/netsurf/libhubbub

0 commit comments

Comments
 (0)