4 Test that we show a place holder for a subtree we are lazily fetching.
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});
27 const expanded = new Set();
28 expanded.add(root.nodeId);
30 await renderComponent(DominatorTreeComponent(immutableUpdate(
31 TEST_DOMINATOR_TREE_PROPS, {
32 dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
35 state: dominatorTreeState.INCREMENTAL_FETCHING,
36 activeFetchRequestCount:
1,
40 ok(container.querySelector(
".subtree-fetching"),
41 "Expanded nodes with more children available, but no children " +
42 "loaded, should get a placeholder");
44 ok(false,
"Got an error: " + DevToolsUtils.safeErrorString(e));