function* performTest() { let [host, win, doc] = yield createHost(); doc.body.setAttribute("style", "position: fixed; width: 100%; height: 100%; margin: 0;"); let first = document.createElement("div"); first.setAttribute("style", "display: inline-block; width: 100%; height: 50%;"); doc.body.appendChild(first); let second = document.createElement("div"); second.setAttribute("style", "display: inline-block; width: 100%; height: 50%;"); doc.body.appendChild(second); let graph1 = new LineGraphWidget(first, "js"); let graph2 = new BarGraphWidget(second); CanvasGraphUtils.linkAnimation(graph1, graph2); CanvasGraphUtils.linkSelection(graph1, graph2); yield graph1.ready(); yield graph2.ready(); testGraphs(graph1, graph2); yield graph1.destroy(); yield graph2.destroy(); host.destroy(); }
function* performTest() { let [host, win, doc] = yield createHost(); doc.body.setAttribute("style", "position: fixed; width: 100%; height: 100%; margin: 0;"); let graph = new LineGraphWidget(doc.body, "fps"); let readyEventEmitted; graph.once("ready", () => readyEventEmitted = true); yield graph.ready(); ok(readyEventEmitted, "The 'ready' event should have been emitted"); testGraph(host, graph); yield graph.destroy(); host.destroy(); }