4 Test that we show a link to load more children when some (but not all) are loaded.
8 <title>Tree component test
</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css">
13 <!-- Give the container height so that the whole tree is rendered. -->
14 <div id=
"container" style=
"height: 900px;"></div>
17 <script src=
"head.js" type=
"application/javascript"></script>
18 <script type=
"application/javascript">
20 window.onload = async function() {
22 const container = document.getElementById(
"container");
24 const root = makeTestDominatorTreeNode({ moreChildrenAvailable: true }, [
25 makeTestDominatorTreeNode({}),
28 ok(root.moreChildrenAvailable);
30 const expanded = new Set();
31 expanded.add(root.nodeId);
33 await renderComponent(DominatorTreeComponent(immutableUpdate(
34 TEST_DOMINATOR_TREE_PROPS, {
35 dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
41 ok(container.querySelector(
".more-children"),
42 "Should get a link to load more children");
44 ok(false,
"Got an error: " + DevToolsUtils.safeErrorString(e));