mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
migrate more tests to htmlRunner
This commit is contained in:
18
src/tests/dom/node_list.html
Normal file
18
src/tests/dom/node_list.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<div id="content">
|
||||
<a id="link" href="foo" class="ok">OK</a>
|
||||
<p id="para-empty" class="ok empty">
|
||||
<span id="para-empty-child"></span>
|
||||
</p>
|
||||
<p id="para"> And</p>
|
||||
<!--comment-->
|
||||
</div>
|
||||
|
||||
<script src="../testing.js"></script>
|
||||
<script id=nodeList>
|
||||
let list = document.getElementById('content').childNodes;
|
||||
testing.expectEqual(9, list.length);
|
||||
testing.expectEqual('Text', list[0].__proto__.constructor.name);
|
||||
let i = 0;
|
||||
list.forEach(function (n, idx) { i += idx; });
|
||||
testing.expectEqual(36, i);
|
||||
</script>
|
||||
Reference in New Issue
Block a user