diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-27 21:55:44 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-27 21:55:44 +0200 |
| commit | 89e864669d62a88f337c02d2097de4afb37e6333 (patch) | |
| tree | 38d0034de8a3bca44a2d8af616e58c19f4ddf02a /internal/flamegraph/livehtml_browser_test.go | |
| parent | 281a433b9ff39c0b290adfc901bdf47cc486491f (diff) | |
flamegraph: add live field-order toggle and reconfigure API
Diffstat (limited to 'internal/flamegraph/livehtml_browser_test.go')
| -rw-r--r-- | internal/flamegraph/livehtml_browser_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/flamegraph/livehtml_browser_test.go b/internal/flamegraph/livehtml_browser_test.go index 4105453..c7a16c7 100644 --- a/internal/flamegraph/livehtml_browser_test.go +++ b/internal/flamegraph/livehtml_browser_test.go @@ -148,7 +148,7 @@ function makeElement(id) { } const elements = {}; -["controls", "flamegraph", "status", "btn-pause", "btn-search", "btn-reset-search", "btn-undo-zoom", "btn-reset-zoom", "btn-reset-baseline"].forEach((id) => { +["controls", "flamegraph", "status", "btn-pause", "btn-search", "btn-reset-search", "btn-undo-zoom", "btn-reset-zoom", "btn-reset-baseline", "btn-toggle-order"].forEach((id) => { elements[id] = makeElement(id); }); elements["body"] = makeElement("body"); @@ -163,6 +163,13 @@ global.document = { }; global.window = global; global.prompt = function(){ return ""; }; +global.fetch = function() { + return Promise.resolve({ + ok: true, + json: function() { return Promise.resolve({ fields: ["comm", "path", "tracepoint"], snapshot: { n: "", v: 0, t: 0 } }); }, + text: function() { return Promise.resolve("{\"n\":\"\",\"v\":0,\"t\":0}"); } + }); +}; global.requestAnimationFrame = function(cb){ cb(); }; global.EventSource = function() { this.onmessage = null; |
