{"id": "patchbench-ts-real-0081", "language": "typescript", "source": "real", "origin": "swe-bench-live-multilang", "upstream_instance_id": "katspaugh__wavesurfer.js-4166", "repo": "katspaugh/wavesurfer.js", "base_commit": "44fd55e88762351fd8913f02a37060cbea88c0e3", "issue_text": "Uncaught (in promise) AbortError: The play() request was interrupted by a call to pause().\n\n## Bug description\nws.play() returns a Promise. If you call ws.pause() before the Promise settles you get this error. There have been other bug reports of a similar nature but I believe this is the root cause.\n\n## Environment\n - Browser: Observed in Chrome, but suspect this will affect Edge, Firefox, Opera, and Safari\n\n## Minimal code snippet\n```js\n// A basic example\n\nimport WaveSurfer from 'wavesurfer.js'\n\nconst wavesurfer = WaveSurfer.create({\n container: document.body,\n waveColor: 'rgb(200, 0, 200)',\n progressColor: 'rgb(100, 0, 100)',\n url: '/examples/audio/demo.wav',\n})\n\nwavesurfer.on('click', () => {\n wavesurfer.play()\n wavesurfer.pause()\n})\n```\n\n## Expected result\nNo error.\nAccording to https://developer.chrome.com/blog/play-request-was-interrupted, ws.pause() should wait for the play() Promise to settle before attempting to pause. \n\n## Obtained result\nUncaught (in promise) AbortError: The play() request was interrupted by a call to pause().\n\n\n\n\n", "hints_text": "@Mattk70 why did you close it? I've seen the same error in the regions e2e test.\nI figured you'd just say \"await the ws.play()\", and if you do this:\n\n```js\nwavesurfer.on('click', async () => {\n await wavesurfer.play()\n wavesurfer.pause()\n})\n```\n\nYou don't get an error. So I was thinking I would come back with a better illustration. It's difficult to re-create the issue but maybe something like this:\n\n\n\n ```js\n// A basic example\n\nimport WaveSurfer from 'wavesurfer.js'\n\nconst wavesurfer = WaveSurfer.create({\n container: document.body,\n waveColor: 'rgb(200, 0, 200)',\n progressColor: 'rgb(100, 0, 100)',\n url: '/examples/audio/demo.wav',\n})\n\n\n\nwavesurfer.on('click', async () => {\n await wavesurfer.play()\n wavesurfer.pause()\n})\n\nwavesurfer.emit('click');\n\n```\nYep, that does it. \n\nAnd yes, in my case, I am getting it while regions are being created (it seems to be when that is during playback, but I haven't been able to reliably reproduce it - it's intermittent (likely a timing thing).\nI see, thanks!\n\nThis started after https://github.com/katspaugh/wavesurfer.js/pull/4014\nI'm not sure this issue started then, I am using 7.9.0\nA quick update: It may indeed have started with v7.9.1. Although I had v7.9.0 installed, my package.json has:\n\n \"wavesurfer.js\": \"^7.9.0\"\n\nSo my app will have been built with v7.9.1 when that became available\n\n", "gold_patch": "diff --git a/examples/spectrogram.js b/examples/spectrogram.js\nindex f1a915997..5d3f678f4 100644\n--- a/examples/spectrogram.js\n+++ b/examples/spectrogram.js\n@@ -17,14 +17,14 @@ ws.registerPlugin(\n Spectrogram.create({\n // Display frequency labels on the left side\n labels: true,\n- \n+\n // Height of the spectrogram in pixels\n height: 200,\n- \n+\n // Render separate spectrograms for each audio channel\n // Set to false to combine all channels into one spectrogram\n splitChannels: true,\n- \n+\n // Frequency scale type:\n // - 'linear': Standard linear frequency scale (0-20kHz)\n // - 'logarithmic': Logarithmic scale, better for low frequencies\n@@ -32,36 +32,36 @@ ws.registerPlugin(\n // - 'bark': Bark scale for psychoacoustic analysis\n // - 'erb': ERB scale for auditory filter modeling\n scale: 'mel',\n- \n+\n // Frequency range to display (in Hz)\n- frequencyMax: 8000, // Maximum frequency to show\n- frequencyMin: 0, // Minimum frequency to show\n- \n+ frequencyMax: 8000, // Maximum frequency to show\n+ frequencyMin: 0, // Minimum frequency to show\n+\n // FFT parameters\n- fftSamples: 1024, // Number of samples for FFT (must be power of 2)\n- // Higher values = better frequency resolution, slower rendering\n- \n+ fftSamples: 1024, // Number of samples for FFT (must be power of 2)\n+ // Higher values = better frequency resolution, slower rendering\n+\n // Visual styling\n- labelsBackground: 'rgba(0, 0, 0, 0.1)', // Background for frequency labels\n- \n+ labelsBackground: 'rgba(0, 0, 0, 0.1)', // Background for frequency labels\n+\n // Performance optimization\n- useWebWorker: true, // Use web worker for FFT calculations (improves performance)\n- \n+ useWebWorker: true, // Use web worker for FFT calculations (improves performance)\n+\n // Additional options you can configure:\n- // \n+ //\n // Window function for FFT (affects frequency resolution vs time resolution):\n // windowFunc: 'hann' | 'hamming' | 'blackman' | 'bartlett' | 'cosine' | 'gauss' | 'lanczoz' | 'rectangular' | 'triangular'\n- // \n+ //\n // Color mapping for frequency intensity:\n // colorMap: 'gray' | 'igray' | 'roseus' | custom array\n- // \n+ //\n // Gain and range for color scaling:\n // gainDB: 20, // Brightness adjustment (default: 20dB)\n // rangeDB: 80, // Dynamic range (default: 80dB)\n- // \n+ //\n // Overlap between FFT windows:\n // noverlap: null, // Auto-calculated by default, or set manually\n- // \n+ //\n // Maximum canvas width for performance:\n // maxCanvasWidth: 30000, // Split large spectrograms into multiple canvases\n }),\ndiff --git a/rollup.config.js b/rollup.config.js\nindex 89e77ef24..1bff4087a 100644\n--- a/rollup.config.js\n+++ b/rollup.config.js\n@@ -2,12 +2,12 @@ import { glob } from 'glob'\n import typescript from '@rollup/plugin-typescript'\n import terser from '@rollup/plugin-terser'\n import dts from 'rollup-plugin-dts'\n-import webWorkerLoader from 'rollup-plugin-web-worker-loader';\n+import webWorkerLoader from 'rollup-plugin-web-worker-loader'\n \n const plugins = [\n webWorkerLoader(),\n- typescript({ declaration: false, declarationDir: null }), \n- terser({ format: { comments: false } })\n+ typescript({ declaration: false, declarationDir: null }),\n+ terser({ format: { comments: false } }),\n ]\n \n export default [\n@@ -52,7 +52,7 @@ export default [\n // Wavesurfer plugins (exclude worker files)\n ...glob\n .sync('src/plugins/*.ts')\n- .filter(plugin => !plugin.includes('worker'))\n+ .filter((plugin) => !plugin.includes('worker'))\n .map((plugin) => [\n // ES module\n {\ndiff --git a/src/base-plugin.ts b/src/base-plugin.ts\nindex 3863024c0..9785c1ca7 100644\n--- a/src/base-plugin.ts\n+++ b/src/base-plugin.ts\n@@ -32,7 +32,7 @@ export class BasePlugin extends Ev\n this.subscriptions = []\n this.isDestroyed = false\n }\n- \n+\n this.wavesurfer = wavesurfer\n this.onInit()\n }\ndiff --git a/src/fft.ts b/src/fft.ts\nindex 32b81118c..04a94f111 100644\n--- a/src/fft.ts\n+++ b/src/fft.ts\n@@ -5,6 +5,7 @@\n * Centralized FFT functionality for spectrogram plugins\n */\n \n+// eslint-disable-next-line\n // @ts-nocheck\n \n export const ERB_A = (1000 * Math.log(10)) / (24.7 * 4.37)\n@@ -104,11 +105,11 @@ function createFilterBank(\n const scale = sampleRate / fftSamples\n \n for (let i = 0; i < numFilters; i++) {\n- let hz = scaleToHzFunc(filterMin + (i / numFilters) * (filterMax - filterMin))\n- let j = Math.floor(hz / scale)\n- let hzLow = j * scale\n- let hzHigh = (j + 1) * scale\n- let r = (hz - hzLow) / (hzHigh - hzLow)\n+ const hz = scaleToHzFunc(filterMin + (i / numFilters) * (filterMax - filterMin))\n+ const j = Math.floor(hz / scale)\n+ const hzLow = j * scale\n+ const hzHigh = (j + 1) * scale\n+ const r = (hz - hzLow) / (hzHigh - hzLow)\n filterBank[i][j] = 1 - r\n filterBank[i][j + 1] = r\n }\n@@ -157,7 +158,7 @@ export const COLOR_MAPS = {\n }\n return colorMap\n },\n- \n+\n igray: () => {\n const colorMap = []\n for (let i = 0; i < 256; i++) {\n@@ -166,10 +167,265 @@ export const COLOR_MAPS = {\n }\n return colorMap\n },\n- \n+\n roseus: () => [\n- [0.004528, 0.004341, 0.004307, 1],[0.005625, 0.006156, 0.006010, 1],[0.006628, 0.008293, 0.008161, 1],[0.007551, 0.010738, 0.010790, 1],[0.008382, 0.013482, 0.013941, 1],[0.009111, 0.016520, 0.017662, 1],[0.009727, 0.019846, 0.022009, 1],[0.010223, 0.023452, 0.027035, 1],[0.010593, 0.027331, 0.032799, 1],[0.010833, 0.031475, 0.039361, 1],[0.010941, 0.035875, 0.046415, 1],[0.010918, 0.040520, 0.053597, 1],[0.010768, 0.045158, 0.060914, 1],[0.010492, 0.049708, 0.068367, 1],[0.010098, 0.054171, 0.075954, 1],[0.009594, 0.058549, 0.083672, 1],[0.008989, 0.062840, 0.091521, 1],[0.008297, 0.067046, 0.099499, 1],[0.007530, 0.071165, 0.107603, 1],[0.006704, 0.075196, 0.115830, 1],[0.005838, 0.079140, 0.124178, 1],[0.004949, 0.082994, 0.132643, 1],[0.004062, 0.086758, 0.141223, 1],[0.003198, 0.090430, 0.149913, 1],[0.002382, 0.094010, 0.158711, 1],[0.001643, 0.097494, 0.167612, 1],[0.001009, 0.100883, 0.176612, 1],[0.000514, 0.104174, 0.185704, 1],[0.000187, 0.107366, 0.194886, 1],[0.000066, 0.110457, 0.204151, 1],[0.000186, 0.113445, 0.213496, 1],[0.000587, 0.116329, 0.222914, 1],[0.001309, 0.119106, 0.232397, 1],[0.002394, 0.121776, 0.241942, 1],[0.003886, 0.124336, 0.251542, 1],[0.005831, 0.126784, 0.261189, 1],[0.008276, 0.129120, 0.270876, 1],[0.011268, 0.131342, 0.280598, 1],[0.014859, 0.133447, 0.290345, 1],[0.019100, 0.135435, 0.300111, 1],[0.024043, 0.137305, 0.309888, 1],[0.029742, 0.139054, 0.319669, 1],[0.036252, 0.140683, 0.329441, 1],[0.043507, 0.142189, 0.339203, 1],[0.050922, 0.143571, 0.348942, 1],[0.058432, 0.144831, 0.358649, 1],[0.066041, 0.145965, 0.368319, 1],[0.073744, 0.146974, 0.377938, 1],[0.081541, 0.147858, 0.387501, 1],[0.089431, 0.148616, 0.396998, 1],[0.097411, 0.149248, 0.406419, 1],[0.105479, 0.149754, 0.415755, 1],[0.113634, 0.150134, 0.424998, 1],[0.121873, 0.150389, 0.434139, 1],[0.130192, 0.150521, 0.443167, 1],[0.138591, 0.150528, 0.452075, 1],[0.147065, 0.150413, 0.460852, 1],[0.155614, 0.150175, 0.469493, 1],[0.164232, 0.149818, 0.477985, 1],[0.172917, 0.149343, 0.486322, 1],[0.181666, 0.148751, 0.494494, 1],[0.190476, 0.148046, 0.502493, 1],[0.199344, 0.147229, 0.510313, 1],[0.208267, 0.146302, 0.517944, 1],[0.217242, 0.145267, 0.525380, 1],[0.226264, 0.144131, 0.532613, 1],[0.235331, 0.142894, 0.539635, 1],[0.244440, 0.141559, 0.546442, 1],[0.253587, 0.140131, 0.553026, 1],[0.262769, 0.138615, 0.559381, 1],[0.271981, 0.137016, 0.565500, 1],[0.281222, 0.135335, 0.571381, 1],[0.290487, 0.133581, 0.577017, 1],[0.299774, 0.131757, 0.582404, 1],[0.309080, 0.129867, 0.587538, 1],[0.318399, 0.127920, 0.592415, 1],[0.327730, 0.125921, 0.597032, 1],[0.337069, 0.123877, 0.601385, 1],[0.346413, 0.121793, 0.605474, 1],[0.355758, 0.119678, 0.609295, 1],[0.365102, 0.117540, 0.612846, 1],[0.374443, 0.115386, 0.616127, 1],[0.383774, 0.113226, 0.619138, 1],[0.393096, 0.111066, 0.621876, 1],[0.402404, 0.108918, 0.624343, 1],[0.411694, 0.106794, 0.626540, 1],[0.420967, 0.104698, 0.628466, 1],[0.430217, 0.102645, 0.630123, 1],[0.439442, 0.100647, 0.631513, 1],[0.448637, 0.098717, 0.632638, 1],[0.457805, 0.096861, 0.633499, 1],[0.466940, 0.095095, 0.634100, 1],[0.476040, 0.093433, 0.634443, 1],[0.485102, 0.091885, 0.634532, 1],[0.494125, 0.090466, 0.634370, 1],[0.503104, 0.089190, 0.633962, 1],[0.512041, 0.088067, 0.633311, 1],[0.520931, 0.087108, 0.632420, 1],[0.529773, 0.086329, 0.631297, 1],[0.538564, 0.085738, 0.629944, 1],[0.547302, 0.085346, 0.628367, 1],[0.555986, 0.085162, 0.626572, 1],[0.564615, 0.085190, 0.624563, 1],[0.573187, 0.085439, 0.622345, 1],[0.581698, 0.085913, 0.619926, 1],[0.590149, 0.086615, 0.617311, 1],[0.598538, 0.087543, 0.614503, 1],[0.606862, 0.088700, 0.611511, 1],[0.615120, 0.090084, 0.608343, 1],[0.623312, 0.091690, 0.605001, 1],[0.631438, 0.093511, 0.601489, 1],[0.639492, 0.095546, 0.597821, 1],[0.647476, 0.097787, 0.593999, 1],[0.655389, 0.100226, 0.590028, 1],[0.663230, 0.102856, 0.585914, 1],[0.670995, 0.105669, 0.581667, 1],[0.678686, 0.108658, 0.577291, 1],[0.686302, 0.111813, 0.572790, 1],[0.693840, 0.115129, 0.568175, 1],[0.701300, 0.118597, 0.563449, 1],[0.708682, 0.122209, 0.558616, 1],[0.715984, 0.125959, 0.553687, 1],[0.723206, 0.129840, 0.548666, 1],[0.730346, 0.133846, 0.543558, 1],[0.737406, 0.137970, 0.538366, 1],[0.744382, 0.142209, 0.533101, 1],[0.751274, 0.146556, 0.527767, 1],[0.758082, 0.151008, 0.522369, 1],[0.764805, 0.155559, 0.516912, 1],[0.771443, 0.160206, 0.511402, 1],[0.777995, 0.164946, 0.505845, 1],[0.784459, 0.169774, 0.500246, 1],[0.790836, 0.174689, 0.494607, 1],[0.797125, 0.179688, 0.488935, 1],[0.803325, 0.184767, 0.483238, 1],[0.809435, 0.189925, 0.477518, 1],[0.815455, 0.195160, 0.471781, 1],[0.821384, 0.200471, 0.466028, 1],[0.827222, 0.205854, 0.460267, 1],[0.832968, 0.211308, 0.454505, 1],[0.838621, 0.216834, 0.448738, 1],[0.844181, 0.222428, 0.442979, 1],[0.849647, 0.228090, 0.437230, 1],[0.855019, 0.233819, 0.431491, 1],[0.860295, 0.239613, 0.425771, 1],[0.865475, 0.245471, 0.420074, 1],[0.870558, 0.251393, 0.414403, 1],[0.875545, 0.257380, 0.408759, 1],[0.880433, 0.263427, 0.403152, 1],[0.885223, 0.269535, 0.397585, 1],[0.889913, 0.275705, 0.392058, 1],[0.894503, 0.281934, 0.386578, 1],[0.898993, 0.288222, 0.381152, 1],[0.903381, 0.294569, 0.375781, 1],[0.907667, 0.300974, 0.370469, 1],[0.911849, 0.307435, 0.365223, 1],[0.915928, 0.313953, 0.360048, 1],[0.919902, 0.320527, 0.354948, 1],[0.923771, 0.327155, 0.349928, 1],[0.927533, 0.333838, 0.344994, 1],[0.931188, 0.340576, 0.340149, 1],[0.934736, 0.347366, 0.335403, 1],[0.938175, 0.354207, 0.330762, 1],[0.941504, 0.361101, 0.326229, 1],[0.944723, 0.368045, 0.321814, 1],[0.947831, 0.375039, 0.317523, 1],[0.950826, 0.382083, 0.313364, 1],[0.953709, 0.389175, 0.309345, 1],[0.956478, 0.396314, 0.305477, 1],[0.959133, 0.403499, 0.301766, 1],[0.961671, 0.410731, 0.298221, 1],[0.964093, 0.418008, 0.294853, 1],[0.966399, 0.425327, 0.291676, 1],[0.968586, 0.432690, 0.288696, 1],[0.970654, 0.440095, 0.285926, 1],[0.972603, 0.447540, 0.283380, 1],[0.974431, 0.455025, 0.281067, 1],[0.976139, 0.462547, 0.279003, 1],[0.977725, 0.470107, 0.277198, 1],[0.979188, 0.477703, 0.275666, 1],[0.980529, 0.485332, 0.274422, 1],[0.981747, 0.492995, 0.273476, 1],[0.982840, 0.500690, 0.272842, 1],[0.983808, 0.508415, 0.272532, 1],[0.984653, 0.516168, 0.272560, 1],[0.985373, 0.523948, 0.272937, 1],[0.985966, 0.531754, 0.273673, 1],[0.986436, 0.539582, 0.274779, 1],[0.986780, 0.547434, 0.276264, 1],[0.986998, 0.555305, 0.278135, 1],[0.987091, 0.563195, 0.280401, 1],[0.987061, 0.571100, 0.283066, 1],[0.986907, 0.579019, 0.286137, 1],[0.986629, 0.586950, 0.289615, 1],[0.986229, 0.594891, 0.293503, 1],[0.985709, 0.602839, 0.297802, 1],[0.985069, 0.610792, 0.302512, 1],[0.984310, 0.618748, 0.307632, 1],[0.983435, 0.626704, 0.313159, 1],[0.982445, 0.634657, 0.319089, 1],[0.981341, 0.642606, 0.325420, 1],[0.980130, 0.650546, 0.332144, 1],[0.978812, 0.658475, 0.339257, 1],[0.977392, 0.666391, 0.346753, 1],[0.975870, 0.674290, 0.354625, 1],[0.974252, 0.682170, 0.362865, 1],[0.972545, 0.690026, 0.371466, 1],[0.970750, 0.697856, 0.380419, 1],[0.968873, 0.705658, 0.389718, 1],[0.966921, 0.713426, 0.399353, 1],[0.964901, 0.721157, 0.409313, 1],[0.962815, 0.728851, 0.419594, 1],[0.960677, 0.736500, 0.430181, 1],[0.958490, 0.744103, 0.441070, 1],[0.956263, 0.751656, 0.452248, 1],[0.954009, 0.759153, 0.463702, 1],[0.951732, 0.766595, 0.475429, 1],[0.949445, 0.773974, 0.487414, 1],[0.947158, 0.781289, 0.499647, 1],[0.944885, 0.788535, 0.512116, 1],[0.942634, 0.795709, 0.524811, 1],[0.940423, 0.802807, 0.537717, 1],[0.938261, 0.809825, 0.550825, 1],[0.936163, 0.816760, 0.564121, 1],[0.934146, 0.823608, 0.577591, 1],[0.932224, 0.830366, 0.591220, 1],[0.930412, 0.837031, 0.604997, 1],[0.928727, 0.843599, 0.618904, 1],[0.927187, 0.850066, 0.632926, 1],[0.925809, 0.856432, 0.647047, 1],[0.924610, 0.862691, 0.661249, 1],[0.923607, 0.868843, 0.675517, 1],[0.922820, 0.874884, 0.689832, 1],[0.922265, 0.880812, 0.704174, 1],[0.921962, 0.886626, 0.718523, 1],[0.921930, 0.892323, 0.732859, 1],[0.922183, 0.897903, 0.747163, 1],[0.922741, 0.903364, 0.761410, 1],[0.923620, 0.908706, 0.775580, 1],[0.924837, 0.913928, 0.789648, 1],[0.926405, 0.919031, 0.803590, 1],[0.928340, 0.924015, 0.817381, 1],[0.930655, 0.928881, 0.830995, 1],[0.933360, 0.933631, 0.844405, 1],[0.936466, 0.938267, 0.857583, 1],[0.939982, 0.942791, 0.870499, 1],[0.943914, 0.947207, 0.883122, 1],[0.948267, 0.951519, 0.895421, 1],[0.953044, 0.955732, 0.907359, 1],[0.958246, 0.959852, 0.918901, 1],[0.963869, 0.963887, 0.930004, 1],[0.969909, 0.967845, 0.940623, 1],[0.976355, 0.971737, 0.950704, 1],[0.983195, 0.975580, 0.960181, 1],[0.990402, 0.979395, 0.968966, 1],[0.997930, 0.983217, 0.976920, 1]\n- ]\n+ [0.004528, 0.004341, 0.004307, 1],\n+ [0.005625, 0.006156, 0.00601, 1],\n+ [0.006628, 0.008293, 0.008161, 1],\n+ [0.007551, 0.010738, 0.01079, 1],\n+ [0.008382, 0.013482, 0.013941, 1],\n+ [0.009111, 0.01652, 0.017662, 1],\n+ [0.009727, 0.019846, 0.022009, 1],\n+ [0.010223, 0.023452, 0.027035, 1],\n+ [0.010593, 0.027331, 0.032799, 1],\n+ [0.010833, 0.031475, 0.039361, 1],\n+ [0.010941, 0.035875, 0.046415, 1],\n+ [0.010918, 0.04052, 0.053597, 1],\n+ [0.010768, 0.045158, 0.060914, 1],\n+ [0.010492, 0.049708, 0.068367, 1],\n+ [0.010098, 0.054171, 0.075954, 1],\n+ [0.009594, 0.058549, 0.083672, 1],\n+ [0.008989, 0.06284, 0.091521, 1],\n+ [0.008297, 0.067046, 0.099499, 1],\n+ [0.00753, 0.071165, 0.107603, 1],\n+ [0.006704, 0.075196, 0.11583, 1],\n+ [0.005838, 0.07914, 0.124178, 1],\n+ [0.004949, 0.082994, 0.132643, 1],\n+ [0.004062, 0.086758, 0.141223, 1],\n+ [0.003198, 0.09043, 0.149913, 1],\n+ [0.002382, 0.09401, 0.158711, 1],\n+ [0.001643, 0.097494, 0.167612, 1],\n+ [0.001009, 0.100883, 0.176612, 1],\n+ [0.000514, 0.104174, 0.185704, 1],\n+ [0.000187, 0.107366, 0.194886, 1],\n+ [0.000066, 0.110457, 0.204151, 1],\n+ [0.000186, 0.113445, 0.213496, 1],\n+ [0.000587, 0.116329, 0.222914, 1],\n+ [0.001309, 0.119106, 0.232397, 1],\n+ [0.002394, 0.121776, 0.241942, 1],\n+ [0.003886, 0.124336, 0.251542, 1],\n+ [0.005831, 0.126784, 0.261189, 1],\n+ [0.008276, 0.12912, 0.270876, 1],\n+ [0.011268, 0.131342, 0.280598, 1],\n+ [0.014859, 0.133447, 0.290345, 1],\n+ [0.0191, 0.135435, 0.300111, 1],\n+ [0.024043, 0.137305, 0.309888, 1],\n+ [0.029742, 0.139054, 0.319669, 1],\n+ [0.036252, 0.140683, 0.329441, 1],\n+ [0.043507, 0.142189, 0.339203, 1],\n+ [0.050922, 0.143571, 0.348942, 1],\n+ [0.058432, 0.144831, 0.358649, 1],\n+ [0.066041, 0.145965, 0.368319, 1],\n+ [0.073744, 0.146974, 0.377938, 1],\n+ [0.081541, 0.147858, 0.387501, 1],\n+ [0.089431, 0.148616, 0.396998, 1],\n+ [0.097411, 0.149248, 0.406419, 1],\n+ [0.105479, 0.149754, 0.415755, 1],\n+ [0.113634, 0.150134, 0.424998, 1],\n+ [0.121873, 0.150389, 0.434139, 1],\n+ [0.130192, 0.150521, 0.443167, 1],\n+ [0.138591, 0.150528, 0.452075, 1],\n+ [0.147065, 0.150413, 0.460852, 1],\n+ [0.155614, 0.150175, 0.469493, 1],\n+ [0.164232, 0.149818, 0.477985, 1],\n+ [0.172917, 0.149343, 0.486322, 1],\n+ [0.181666, 0.148751, 0.494494, 1],\n+ [0.190476, 0.148046, 0.502493, 1],\n+ [0.199344, 0.147229, 0.510313, 1],\n+ [0.208267, 0.146302, 0.517944, 1],\n+ [0.217242, 0.145267, 0.52538, 1],\n+ [0.226264, 0.144131, 0.532613, 1],\n+ [0.235331, 0.142894, 0.539635, 1],\n+ [0.24444, 0.141559, 0.546442, 1],\n+ [0.253587, 0.140131, 0.553026, 1],\n+ [0.262769, 0.138615, 0.559381, 1],\n+ [0.271981, 0.137016, 0.5655, 1],\n+ [0.281222, 0.135335, 0.571381, 1],\n+ [0.290487, 0.133581, 0.577017, 1],\n+ [0.299774, 0.131757, 0.582404, 1],\n+ [0.30908, 0.129867, 0.587538, 1],\n+ [0.318399, 0.12792, 0.592415, 1],\n+ [0.32773, 0.125921, 0.597032, 1],\n+ [0.337069, 0.123877, 0.601385, 1],\n+ [0.346413, 0.121793, 0.605474, 1],\n+ [0.355758, 0.119678, 0.609295, 1],\n+ [0.365102, 0.11754, 0.612846, 1],\n+ [0.374443, 0.115386, 0.616127, 1],\n+ [0.383774, 0.113226, 0.619138, 1],\n+ [0.393096, 0.111066, 0.621876, 1],\n+ [0.402404, 0.108918, 0.624343, 1],\n+ [0.411694, 0.106794, 0.62654, 1],\n+ [0.420967, 0.104698, 0.628466, 1],\n+ [0.430217, 0.102645, 0.630123, 1],\n+ [0.439442, 0.100647, 0.631513, 1],\n+ [0.448637, 0.098717, 0.632638, 1],\n+ [0.457805, 0.096861, 0.633499, 1],\n+ [0.46694, 0.095095, 0.6341, 1],\n+ [0.47604, 0.093433, 0.634443, 1],\n+ [0.485102, 0.091885, 0.634532, 1],\n+ [0.494125, 0.090466, 0.63437, 1],\n+ [0.503104, 0.08919, 0.633962, 1],\n+ [0.512041, 0.088067, 0.633311, 1],\n+ [0.520931, 0.087108, 0.63242, 1],\n+ [0.529773, 0.086329, 0.631297, 1],\n+ [0.538564, 0.085738, 0.629944, 1],\n+ [0.547302, 0.085346, 0.628367, 1],\n+ [0.555986, 0.085162, 0.626572, 1],\n+ [0.564615, 0.08519, 0.624563, 1],\n+ [0.573187, 0.085439, 0.622345, 1],\n+ [0.581698, 0.085913, 0.619926, 1],\n+ [0.590149, 0.086615, 0.617311, 1],\n+ [0.598538, 0.087543, 0.614503, 1],\n+ [0.606862, 0.0887, 0.611511, 1],\n+ [0.61512, 0.090084, 0.608343, 1],\n+ [0.623312, 0.09169, 0.605001, 1],\n+ [0.631438, 0.093511, 0.601489, 1],\n+ [0.639492, 0.095546, 0.597821, 1],\n+ [0.647476, 0.097787, 0.593999, 1],\n+ [0.655389, 0.100226, 0.590028, 1],\n+ [0.66323, 0.102856, 0.585914, 1],\n+ [0.670995, 0.105669, 0.581667, 1],\n+ [0.678686, 0.108658, 0.577291, 1],\n+ [0.686302, 0.111813, 0.57279, 1],\n+ [0.69384, 0.115129, 0.568175, 1],\n+ [0.7013, 0.118597, 0.563449, 1],\n+ [0.708682, 0.122209, 0.558616, 1],\n+ [0.715984, 0.125959, 0.553687, 1],\n+ [0.723206, 0.12984, 0.548666, 1],\n+ [0.730346, 0.133846, 0.543558, 1],\n+ [0.737406, 0.13797, 0.538366, 1],\n+ [0.744382, 0.142209, 0.533101, 1],\n+ [0.751274, 0.146556, 0.527767, 1],\n+ [0.758082, 0.151008, 0.522369, 1],\n+ [0.764805, 0.155559, 0.516912, 1],\n+ [0.771443, 0.160206, 0.511402, 1],\n+ [0.777995, 0.164946, 0.505845, 1],\n+ [0.784459, 0.169774, 0.500246, 1],\n+ [0.790836, 0.174689, 0.494607, 1],\n+ [0.797125, 0.179688, 0.488935, 1],\n+ [0.803325, 0.184767, 0.483238, 1],\n+ [0.809435, 0.189925, 0.477518, 1],\n+ [0.815455, 0.19516, 0.471781, 1],\n+ [0.821384, 0.200471, 0.466028, 1],\n+ [0.827222, 0.205854, 0.460267, 1],\n+ [0.832968, 0.211308, 0.454505, 1],\n+ [0.838621, 0.216834, 0.448738, 1],\n+ [0.844181, 0.222428, 0.442979, 1],\n+ [0.849647, 0.22809, 0.43723, 1],\n+ [0.855019, 0.233819, 0.431491, 1],\n+ [0.860295, 0.239613, 0.425771, 1],\n+ [0.865475, 0.245471, 0.420074, 1],\n+ [0.870558, 0.251393, 0.414403, 1],\n+ [0.875545, 0.25738, 0.408759, 1],\n+ [0.880433, 0.263427, 0.403152, 1],\n+ [0.885223, 0.269535, 0.397585, 1],\n+ [0.889913, 0.275705, 0.392058, 1],\n+ [0.894503, 0.281934, 0.386578, 1],\n+ [0.898993, 0.288222, 0.381152, 1],\n+ [0.903381, 0.294569, 0.375781, 1],\n+ [0.907667, 0.300974, 0.370469, 1],\n+ [0.911849, 0.307435, 0.365223, 1],\n+ [0.915928, 0.313953, 0.360048, 1],\n+ [0.919902, 0.320527, 0.354948, 1],\n+ [0.923771, 0.327155, 0.349928, 1],\n+ [0.927533, 0.333838, 0.344994, 1],\n+ [0.931188, 0.340576, 0.340149, 1],\n+ [0.934736, 0.347366, 0.335403, 1],\n+ [0.938175, 0.354207, 0.330762, 1],\n+ [0.941504, 0.361101, 0.326229, 1],\n+ [0.944723, 0.368045, 0.321814, 1],\n+ [0.947831, 0.375039, 0.317523, 1],\n+ [0.950826, 0.382083, 0.313364, 1],\n+ [0.953709, 0.389175, 0.309345, 1],\n+ [0.956478, 0.396314, 0.305477, 1],\n+ [0.959133, 0.403499, 0.301766, 1],\n+ [0.961671, 0.410731, 0.298221, 1],\n+ [0.964093, 0.418008, 0.294853, 1],\n+ [0.966399, 0.425327, 0.291676, 1],\n+ [0.968586, 0.43269, 0.288696, 1],\n+ [0.970654, 0.440095, 0.285926, 1],\n+ [0.972603, 0.44754, 0.28338, 1],\n+ [0.974431, 0.455025, 0.281067, 1],\n+ [0.976139, 0.462547, 0.279003, 1],\n+ [0.977725, 0.470107, 0.277198, 1],\n+ [0.979188, 0.477703, 0.275666, 1],\n+ [0.980529, 0.485332, 0.274422, 1],\n+ [0.981747, 0.492995, 0.273476, 1],\n+ [0.98284, 0.50069, 0.272842, 1],\n+ [0.983808, 0.508415, 0.272532, 1],\n+ [0.984653, 0.516168, 0.27256, 1],\n+ [0.985373, 0.523948, 0.272937, 1],\n+ [0.985966, 0.531754, 0.273673, 1],\n+ [0.986436, 0.539582, 0.274779, 1],\n+ [0.98678, 0.547434, 0.276264, 1],\n+ [0.986998, 0.555305, 0.278135, 1],\n+ [0.987091, 0.563195, 0.280401, 1],\n+ [0.987061, 0.5711, 0.283066, 1],\n+ [0.986907, 0.579019, 0.286137, 1],\n+ [0.986629, 0.58695, 0.289615, 1],\n+ [0.986229, 0.594891, 0.293503, 1],\n+ [0.985709, 0.602839, 0.297802, 1],\n+ [0.985069, 0.610792, 0.302512, 1],\n+ [0.98431, 0.618748, 0.307632, 1],\n+ [0.983435, 0.626704, 0.313159, 1],\n+ [0.982445, 0.634657, 0.319089, 1],\n+ [0.981341, 0.642606, 0.32542, 1],\n+ [0.98013, 0.650546, 0.332144, 1],\n+ [0.978812, 0.658475, 0.339257, 1],\n+ [0.977392, 0.666391, 0.346753, 1],\n+ [0.97587, 0.67429, 0.354625, 1],\n+ [0.974252, 0.68217, 0.362865, 1],\n+ [0.972545, 0.690026, 0.371466, 1],\n+ [0.97075, 0.697856, 0.380419, 1],\n+ [0.968873, 0.705658, 0.389718, 1],\n+ [0.966921, 0.713426, 0.399353, 1],\n+ [0.964901, 0.721157, 0.409313, 1],\n+ [0.962815, 0.728851, 0.419594, 1],\n+ [0.960677, 0.7365, 0.430181, 1],\n+ [0.95849, 0.744103, 0.44107, 1],\n+ [0.956263, 0.751656, 0.452248, 1],\n+ [0.954009, 0.759153, 0.463702, 1],\n+ [0.951732, 0.766595, 0.475429, 1],\n+ [0.949445, 0.773974, 0.487414, 1],\n+ [0.947158, 0.781289, 0.499647, 1],\n+ [0.944885, 0.788535, 0.512116, 1],\n+ [0.942634, 0.795709, 0.524811, 1],\n+ [0.940423, 0.802807, 0.537717, 1],\n+ [0.938261, 0.809825, 0.550825, 1],\n+ [0.936163, 0.81676, 0.564121, 1],\n+ [0.934146, 0.823608, 0.577591, 1],\n+ [0.932224, 0.830366, 0.59122, 1],\n+ [0.930412, 0.837031, 0.604997, 1],\n+ [0.928727, 0.843599, 0.618904, 1],\n+ [0.927187, 0.850066, 0.632926, 1],\n+ [0.925809, 0.856432, 0.647047, 1],\n+ [0.92461, 0.862691, 0.661249, 1],\n+ [0.923607, 0.868843, 0.675517, 1],\n+ [0.92282, 0.874884, 0.689832, 1],\n+ [0.922265, 0.880812, 0.704174, 1],\n+ [0.921962, 0.886626, 0.718523, 1],\n+ [0.92193, 0.892323, 0.732859, 1],\n+ [0.922183, 0.897903, 0.747163, 1],\n+ [0.922741, 0.903364, 0.76141, 1],\n+ [0.92362, 0.908706, 0.77558, 1],\n+ [0.924837, 0.913928, 0.789648, 1],\n+ [0.926405, 0.919031, 0.80359, 1],\n+ [0.92834, 0.924015, 0.817381, 1],\n+ [0.930655, 0.928881, 0.830995, 1],\n+ [0.93336, 0.933631, 0.844405, 1],\n+ [0.936466, 0.938267, 0.857583, 1],\n+ [0.939982, 0.942791, 0.870499, 1],\n+ [0.943914, 0.947207, 0.883122, 1],\n+ [0.948267, 0.951519, 0.895421, 1],\n+ [0.953044, 0.955732, 0.907359, 1],\n+ [0.958246, 0.959852, 0.918901, 1],\n+ [0.963869, 0.963887, 0.930004, 1],\n+ [0.969909, 0.967845, 0.940623, 1],\n+ [0.976355, 0.971737, 0.950704, 1],\n+ [0.983195, 0.97558, 0.960181, 1],\n+ [0.990402, 0.979395, 0.968966, 1],\n+ [0.99793, 0.983217, 0.97692, 1],\n+ ],\n }\n \n /**\n@@ -215,11 +471,11 @@ export function unitType(freq: number): string {\n * Get frequency value for label at given index\n */\n export function getLabelFrequency(\n- index: number, \n- labelIndex: number, \n- frequencyMin: number, \n- frequencyMax: number, \n- scale: 'linear' | 'logarithmic' | 'mel' | 'bark' | 'erb'\n+ index: number,\n+ labelIndex: number,\n+ frequencyMin: number,\n+ frequencyMax: number,\n+ scale: 'linear' | 'logarithmic' | 'mel' | 'bark' | 'erb',\n ): number {\n const scaleMin = hzToScale(frequencyMin, scale)\n const scaleMax = hzToScale(frequencyMax, scale)\n@@ -237,7 +493,7 @@ export function createWrapperClickHandler(wrapper: HTMLElement, emit: (event: st\n const relativePosition = relativeX / relativeWidth\n emit('click', relativePosition)\n }\n-} \n+}\n \n /**\n * Calculate FFT - Based on https://github.com/corbanbrook/dsp.js\n@@ -255,22 +511,21 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n this.peakBand = 0\n this.peak = 0\n \n- var i\n switch (windowFunc) {\n case 'bartlett':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = (2 / (bufferSize - 1)) * ((bufferSize - 1) / 2 - Math.abs(i - (bufferSize - 1) / 2))\n }\n break\n case 'bartlettHann':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] =\n 0.62 - 0.48 * Math.abs(i / (bufferSize - 1) - 0.5) - 0.38 * Math.cos((Math.PI * 2 * i) / (bufferSize - 1))\n }\n break\n case 'blackman':\n alpha = alpha || 0.16\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] =\n (1 - alpha) / 2 -\n 0.5 * Math.cos((Math.PI * 2 * i) / (bufferSize - 1)) +\n@@ -278,13 +533,13 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n }\n break\n case 'cosine':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = Math.cos((Math.PI * i) / (bufferSize - 1) - Math.PI / 2)\n }\n break\n case 'gauss':\n alpha = alpha || 0.25\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = Math.pow(\n Math.E,\n -0.5 * Math.pow((i - (bufferSize - 1) / 2) / ((alpha * (bufferSize - 1)) / 2), 2),\n@@ -292,29 +547,29 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n }\n break\n case 'hamming':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = 0.54 - 0.46 * Math.cos((Math.PI * 2 * i) / (bufferSize - 1))\n }\n break\n case 'hann':\n case undefined:\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = 0.5 * (1 - Math.cos((Math.PI * 2 * i) / (bufferSize - 1)))\n }\n break\n case 'lanczoz':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] =\n Math.sin(Math.PI * ((2 * i) / (bufferSize - 1) - 1)) / (Math.PI * ((2 * i) / (bufferSize - 1) - 1))\n }\n break\n case 'rectangular':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = 1\n }\n break\n case 'triangular':\n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.windowValues[i] = (2 / bufferSize) * (bufferSize / 2 - Math.abs(i - (bufferSize - 1) / 2))\n }\n break\n@@ -322,12 +577,11 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n throw Error(\"No such window function '\" + windowFunc + \"'\")\n }\n \n- var limit = 1\n- var bit = bufferSize >> 1\n- var i\n+ let limit = 1\n+ let bit = bufferSize >> 1\n \n while (limit < bufferSize) {\n- for (i = 0; i < limit; i++) {\n+ for (let i = 0; i < limit; i++) {\n this.reverseTable[i + limit] = this.reverseTable[i] + bit\n }\n \n@@ -335,13 +589,13 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n bit = bit >> 1\n }\n \n- for (i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n this.sinTable[i] = Math.sin(-Math.PI / i)\n this.cosTable[i] = Math.cos(-Math.PI / i)\n }\n \n this.calculateSpectrum = function (buffer: Float32Array): Float32Array {\n- var bufferSize = this.bufferSize,\n+ const bufferSize = this.bufferSize,\n cosTable = this.cosTable,\n sinTable = this.sinTable,\n reverseTable = this.reverseTable,\n@@ -349,12 +603,11 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n imag = new Float32Array(bufferSize),\n bSi = 2 / this.bufferSize,\n sqrt = Math.sqrt,\n- rval,\n- ival,\n- mag,\n spectrum = new Float32Array(bufferSize / 2)\n \n- var k = Math.floor(Math.log(bufferSize) / Math.LN2)\n+ let rval, ival, mag\n+\n+ const k = Math.floor(Math.log(bufferSize) / Math.LN2)\n \n if (Math.pow(2, k) !== bufferSize) {\n throw 'Invalid buffer size, must be a power of 2.'\n@@ -368,7 +621,7 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n )\n }\n \n- var halfSize = 1,\n+ let halfSize = 1,\n phaseShiftStepReal,\n phaseShiftStepImag,\n currentPhaseShiftReal,\n@@ -378,7 +631,7 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n ti,\n tmpReal\n \n- for (var i = 0; i < bufferSize; i++) {\n+ for (let i = 0; i < bufferSize; i++) {\n real[i] = buffer[reverseTable[i]] * this.windowValues[reverseTable[i]]\n imag[i] = 0\n }\n@@ -390,8 +643,8 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n currentPhaseShiftReal = 1\n currentPhaseShiftImag = 0\n \n- for (var fftStep = 0; fftStep < halfSize; fftStep++) {\n- var i = fftStep\n+ for (let fftStep = 0; fftStep < halfSize; fftStep++) {\n+ let i = fftStep\n \n while (i < bufferSize) {\n off = i + halfSize\n@@ -414,7 +667,7 @@ function FFT(bufferSize: number, sampleRate: number, windowFunc: string, alpha:\n halfSize = halfSize << 1\n }\n \n- for (var i = 0, N = bufferSize / 2; i < N; i++) {\n+ for (let i = 0, N = bufferSize / 2; i < N; i++) {\n rval = real[i]\n ival = imag[i]\n mag = bSi * sqrt(rval * rval + ival * ival)\ndiff --git a/src/player.ts b/src/player.ts\nindex ab2db33d9..bfb78cceb 100644\n--- a/src/player.ts\n+++ b/src/player.ts\n@@ -104,7 +104,14 @@ class Player extends EventEmitter {\n \n /** Start playing the audio */\n public async play(): Promise {\n- return this.media.play()\n+ try {\n+ return await this.media.play()\n+ } catch (err) {\n+ if (err instanceof DOMException && err.name === 'AbortError') {\n+ return\n+ }\n+ throw err\n+ }\n }\n \n /** Pause the audio */\ndiff --git a/src/plugins/spectrogram-windowed.ts b/src/plugins/spectrogram-windowed.ts\nindex 21e68c934..f439f8c22 100644\n--- a/src/plugins/spectrogram-windowed.ts\n+++ b/src/plugins/spectrogram-windowed.ts\n@@ -1,6 +1,6 @@\n /**\n * Windowed Spectrogram plugin - Optimized for very long audio files\n- * \n+ *\n * Only renders frequency data in a sliding window around the current viewport,\n * keeping memory usage constant regardless of audio length.\n */\n@@ -10,16 +10,16 @@\n import BasePlugin, { type BasePluginEvents } from '../base-plugin.js'\n import createElement from '../dom.js'\n // Import centralized FFT functionality\n-import FFT, { \n+import FFT, {\n hzToScale,\n scaleToHz,\n createFilterBankForScale,\n applyFilterBank,\n- setupColorMap, \n- freqType, \n- unitType, \n- getLabelFrequency, \n- createWrapperClickHandler\n+ setupColorMap,\n+ freqType,\n+ unitType,\n+ getLabelFrequency,\n+ createWrapperClickHandler,\n } from '../fft.js'\n \n // Import the worker using rollup-plugin-web-worker-loader\n@@ -82,7 +82,7 @@ export type WindowedSpectrogramPluginOptions = {\n export type WindowedSpectrogramPluginEvents = BasePluginEvents & {\n ready: []\n click: [relativeX: number]\n- 'progress': [progress: number] // Progress from 0 to 1\n+ progress: [progress: number] // Progress from 0 to 1\n }\n \n /**\n@@ -113,7 +113,7 @@ class WindowedSpectrogramPlugin extends BasePlugin = new Map()\n+ private workerPromises: Map = new Map()\n \n static create(options?: WindowedSpectrogramPluginOptions) {\n return new WindowedSpectrogramPlugin(options || {})\n@@ -154,7 +154,7 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n const { type, id, result, error } = e.data\n- \n+\n if (type === 'frequenciesResult') {\n const promise = this.workerPromises.get(id)\n if (promise) {\n@@ -218,25 +218,18 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n console.warn('Spectrogram worker error, falling back to main thread:', error)\n // Fallback to main thread calculation\n this.worker = null\n }\n- \n } catch (error) {\n console.warn('Failed to initialize worker, falling back to main thread:', error)\n this.worker = null\n }\n }\n \n-\n-\n-\n-\n-\n-\n onInit() {\n // Recreate DOM elements if they were destroyed\n if (!this.wrapper) {\n@@ -263,26 +256,28 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n this.updatePosition(currentTime)\n- })\n+ }),\n )\n \n // Listen for scroll events\n this.subscriptions.push(\n this.wavesurfer.on('scroll', () => {\n this.handleScroll()\n- })\n+ }),\n )\n \n // Listen for zoom changes\n this.subscriptions.push(this.wavesurfer.on('redraw', () => this.handleRedraw()))\n \n // Listen for audio data ready\n- this.subscriptions.push(this.wavesurfer.on('ready', () => {\n- const decodedData = this.wavesurfer.getDecodedData()\n- if (decodedData) {\n- this.render(decodedData)\n- }\n- }))\n+ this.subscriptions.push(\n+ this.wavesurfer.on('ready', () => {\n+ const decodedData = this.wavesurfer.getDecodedData()\n+ if (decodedData) {\n+ this.render(decodedData)\n+ }\n+ }),\n+ )\n \n // Trigger initial render after re-initialization\n // This ensures the spectrogram appears even if no redraw event is fired\n@@ -345,22 +340,21 @@ class WindowedSpectrogramPlugin extends BasePlugin 0) {\n this.updateSegmentPositions(oldPixelsPerSecond, this.pixelsPerSecond)\n }\n- \n+\n this.scheduleRender()\n }\n \n private updateSegmentPositions(oldPxPerSec: number, newPxPerSec: number) {\n- \n for (const segment of this.segments.values()) {\n // Update pixel positions based on new zoom level\n segment.startPixel = segment.startTime * newPxPerSec\n segment.endPixel = segment.endTime * newPxPerSec\n- \n+\n // Update canvas positioning and size WITHOUT recalculating frequencies\n if (segment.canvas) {\n const segmentWidth = segment.endPixel - segment.startPixel\n@@ -368,7 +362,7 @@ class WindowedSpectrogramPlugin extends BasePlugin 2.0) {\n@@ -381,7 +375,7 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n this.updateVisibleSegmentQuality()\n }, 500) // Wait 500ms after zoom stops\n@@ -391,36 +385,33 @@ class WindowedSpectrogramPlugin extends BasePlugin \n- segment.startTime < visibleEndTime && segment.endTime > visibleStartTime\n+ const visibleSegments = Array.from(this.segments.values()).filter(\n+ (segment) => segment.startTime < visibleEndTime && segment.endTime > visibleStartTime,\n )\n- \n+\n if (visibleSegments.length === 0) {\n return\n }\n- \n- \n+\n // Re-render only the visible segments with current zoom level\n for (const segment of visibleSegments) {\n if (segment.canvas) {\n await this.renderSegment(segment)\n }\n }\n- \n }\n \n private getScrollLeft(wrapper: HTMLElement): number {\n@@ -431,7 +422,7 @@ class WindowedSpectrogramPlugin extends BasePlugin 30) {\n console.warn(`\u26a0\ufe0f Large visible duration: ${visibleDuration.toFixed(1)}s - limiting buffer`)\n bufferTimeSeconds = 1 // Smaller buffer for very zoomed out views\n@@ -537,7 +528,6 @@ class WindowedSpectrogramPlugin extends BasePlugin 0) {\n for (const [key, segment] of this.segments) {\n@@ -586,7 +573,7 @@ class WindowedSpectrogramPlugin extends BasePlugin 0) {\n const segment: FrequencySegment = {\n startTime: segmentStart,\n endTime: segmentEnd,\n startPixel: shouldFillContainer ? 0 : segmentStart * pixelsPerSec, // Start at 0 for fill mode\n endPixel: shouldFillContainer ? containerWidth : segmentEnd * pixelsPerSec, // End at container width for fill mode\n- frequencies: frequencies\n+ frequencies: frequencies,\n }\n \n this.segments.set(segmentKey, segment)\n- \n+\n // Render this segment\n const renderStartTime = performance.now()\n await this.renderSegment(segment)\n const renderEndTime = performance.now()\n- \n+\n // Emit progress update\n this.emitProgress()\n } else {\n@@ -642,50 +629,53 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n+ private findUncoveredTimeRanges(\n+ startTime: number,\n+ endTime: number,\n+ segmentDuration: number,\n+ ): Array<{ start: number; end: number }> {\n // Get all existing segments sorted by start time\n- const existingSegments = Array.from(this.segments.values())\n- .sort((a, b) => a.startTime - b.startTime)\n- \n- const uncoveredRanges: Array<{start: number, end: number}> = []\n+ const existingSegments = Array.from(this.segments.values()).sort((a, b) => a.startTime - b.startTime)\n+\n+ const uncoveredRanges: Array<{ start: number; end: number }> = []\n let currentTime = startTime\n- \n+\n for (const segment of existingSegments) {\n // If there's a gap before this segment\n if (currentTime < segment.startTime && currentTime < endTime) {\n const gapEnd = Math.min(segment.startTime, endTime)\n uncoveredRanges.push({\n start: currentTime,\n- end: gapEnd\n+ end: gapEnd,\n })\n }\n- \n+\n // Move past this segment\n currentTime = Math.max(currentTime, segment.endTime)\n- \n+\n // If we've covered the requested range, stop\n if (currentTime >= endTime) {\n break\n }\n }\n- \n+\n // If there's still uncovered time at the end\n if (currentTime < endTime) {\n uncoveredRanges.push({\n start: currentTime,\n- end: endTime\n+ end: endTime,\n })\n }\n- \n+\n return uncoveredRanges\n }\n \n private startProgressiveLoading() {\n if (this.isProgressiveLoading || !this.buffer || !this.progressiveLoading) return\n- \n+\n this.isProgressiveLoading = true\n this.nextProgressiveSegmentTime = 0 // Start from the beginning\n- \n+\n // Start loading after a short delay to not interfere with user interactions\n this.progressiveLoadTimeout = window.setTimeout(() => {\n this.progressiveLoadNextSegment()\n@@ -707,11 +697,11 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n this.progressiveLoadNextSegment()\n@@ -742,20 +732,20 @@ class WindowedSpectrogramPlugin extends BasePlugin= totalDuration) {\n return 100\n }\n- \n+\n return progress\n }\n \n@@ -819,7 +809,7 @@ class WindowedSpectrogramPlugin extends BasePlugin((resolve, reject) => {\n this.workerPromises.set(id, { resolve, reject })\n- \n+\n // Set timeout to avoid hanging\n setTimeout(() => {\n if (this.workerPromises.has(id)) {\n@@ -845,8 +835,8 @@ class WindowedSpectrogramPlugin extends BasePlugin 1e-12 ? spectrum[j] : 1e-12\n const valueDB = 20 * Math.log10(magnitude)\n- \n+\n if (valueDB < -gainPlusRange) {\n freqBins[j] = 0\n } else if (valueDB > -this.gainDB) {\n@@ -952,14 +942,14 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n const rect = this.wrapper.getBoundingClientRect()\n const relativeX = e.clientX - rect.left\n@@ -1059,8 +1041,6 @@ class WindowedSpectrogramPlugin extends BasePlugin= 1000 ? 'kHz' : 'Hz'\n }\n \n-\n-\n private getLabelFrequency(index: number, labelIndex: number) {\n const scaleMin = hzToScale(this.frequencyMin, this.scale)\n const scaleMax = hzToScale(this.frequencyMax, this.scale)\n@@ -1172,35 +1152,35 @@ class WindowedSpectrogramPlugin extends BasePlugin 0) {\n return minPxPerSec\n }\n- \n+\n // For windowed mode, enforce a minimum zoom level so we never try to fit entire audio on screen\n const WINDOWED_MIN_PX_PER_SEC = 50 // At least 50 pixels per second for windowed mode\n- \n+\n // Fallback: calculate based on wrapper width and audio duration\n if (this.buffer) {\n const wrapperWidth = this.getWidth()\n const calculatedPxPerSec = wrapperWidth > 0 ? wrapperWidth / this.buffer.duration : 100\n- \n+\n // For windowed mode, we want to show only a small portion of audio at a time\n // Use the maximum of calculated value and our minimum to ensure reasonable zoom\n const finalPxPerSec = Math.max(calculatedPxPerSec, WINDOWED_MIN_PX_PER_SEC)\n- \n+\n return finalPxPerSec\n }\n- \n+\n return WINDOWED_MIN_PX_PER_SEC\n }\n \n@@ -1277,4 +1255,4 @@ class WindowedSpectrogramPlugin extends BasePlugin {\n private static MAX_CANVAS_WIDTH = 30000\n private static MAX_NODES = 10\n- \n+\n private frequenciesDataUrl?: string\n private container: HTMLElement\n private wrapper: HTMLElement\n@@ -149,7 +149,7 @@ class SpectrogramPlugin extends BasePlugin = new Map()\n- \n+\n // Performance optimization properties\n private cachedFrequencies: Uint8Array[][] | null = null\n private cachedResampledData: Uint8Array[][] | null = null\n@@ -287,7 +287,7 @@ class SpectrogramPlugin extends BasePlugin this.throttledRender()))\n- \n+\n // Trigger initial render after re-initialization\n // This ensures the spectrogram appears even if no redraw event is fired\n if (this.wavesurfer.getDecodedData()) {\n@@ -300,7 +300,7 @@ class SpectrogramPlugin extends BasePlugin canvas.remove())\n+ this.canvases.forEach((canvas) => canvas.remove())\n this.canvases = []\n this.drawnCanvases = {}\n }\n@@ -486,16 +486,16 @@ class SpectrogramPlugin extends BasePlugin {\n@@ -512,15 +512,15 @@ class SpectrogramPlugin extends BasePlugin {\n if (canvasIndex < 0 || canvasIndex >= numCanvases) return\n if (this.drawnCanvases[canvasIndex]) return\n- \n+\n this.drawnCanvases[canvasIndex] = true\n \n const offset = canvasIndex * maxCanvasWidth\n@@ -619,7 +619,7 @@ class SpectrogramPlugin extends BasePlugin {\n- // Remove from pending set\n- this.pendingBitmaps.delete(bitmapPromise)\n- \n- // Check if canvas is still valid before drawing\n- if (ctx.canvas.parentNode) {\n- const drawHeight = (height * rMax1) / rMax\n- const drawY = yOffset + height * (1 - rMax1 / rMax)\n- \n- ctx.drawImage(bitmap, 0, drawY, canvasWidth, drawHeight)\n- \n- // Clean up bitmap to free memory\n- if ('close' in bitmap) {\n- bitmap.close()\n- }\n- }\n- }).catch((error) => {\n- // Clean up on error\n- this.pendingBitmaps.delete(bitmapPromise)\n- })\n- }\n \n+ bitmapPromise\n+ .then((bitmap) => {\n+ // Remove from pending set\n+ this.pendingBitmaps.delete(bitmapPromise)\n \n+ // Check if canvas is still valid before drawing\n+ if (ctx.canvas.parentNode) {\n+ const drawHeight = (height * rMax1) / rMax\n+ const drawY = yOffset + height * (1 - rMax1 / rMax)\n+\n+ ctx.drawImage(bitmap, 0, drawY, canvasWidth, drawHeight)\n+\n+ // Clean up bitmap to free memory\n+ if ('close' in bitmap) {\n+ bitmap.close()\n+ }\n+ }\n+ })\n+ .catch((error) => {\n+ // Clean up on error\n+ this.pendingBitmaps.delete(bitmapPromise)\n+ })\n+ }\n \n private getWidth() {\n return this.wavesurfer.getWrapper().offsetWidth\n@@ -802,7 +805,7 @@ class SpectrogramPlugin extends BasePlugin 1e-12 ? spectrum[j] : 1e-12\n const valueDB = 20 * Math.log10(magnitude)\n- \n+\n if (valueDB < -gainPlusRange) {\n freqBins[j] = 0\n } else if (valueDB > -this.gainDB) {\n@@ -940,8 +943,6 @@ class SpectrogramPlugin extends BasePlugin this.resampleChannel(channelFreq, targetWidth))\n+ return frequenciesData.map((channelFreq) => this.resampleChannel(channelFreq, targetWidth))\n }\n \n private resampleChannel(oldMatrix: Uint8Array[], targetWidth: number): Uint8Array[] {\n const oldColumns = oldMatrix.length\n const freqBins = oldMatrix[0]?.length || 0\n- \n+\n // Fast path for no resampling needed\n if (oldColumns === targetWidth || targetWidth === 0) {\n return oldMatrix\n }\n- \n+\n const ratio = oldColumns / targetWidth\n- \n+\n // Always use quality resampling for accurate spectrograms\n const newMatrix = new Array(targetWidth)\n- \n+\n if (ratio >= 1) {\n // Downsampling with proper averaging\n for (let i = 0; i < targetWidth; i++) {\n const start = Math.floor(i * ratio)\n const end = Math.min(Math.ceil((i + 1) * ratio), oldColumns)\n const count = end - start\n- \n+\n // Always create new column to avoid reference issues\n const column = new Uint8Array(freqBins)\n if (count === 1) {\n@@ -1062,9 +1063,9 @@ class SpectrogramPlugin extends BasePlugin {\n }\n }\n \n-export default Timer\n\\ No newline at end of file\n+export default Timer\n", "test_patch": "diff --git a/src/__tests__/player.test.ts b/src/__tests__/player.test.ts\nindex 34537034a..842573dbb 100644\n--- a/src/__tests__/player.test.ts\n+++ b/src/__tests__/player.test.ts\n@@ -26,6 +26,23 @@ describe('Player', () => {\n expect(media.pause).toHaveBeenCalled()\n })\n \n+ test('pause before play promise resolves does not reject', async () => {\n+ const abort = new DOMException('interrupted', 'AbortError')\n+ let rejectPlay: (reason?: unknown) => void = () => undefined\n+ const media = createMedia()\n+ media.play = jest.fn(\n+ () =>\n+ new Promise((_, reject) => {\n+ rejectPlay = reject\n+ }),\n+ )\n+ const player = new Player({ media })\n+ const promise = player.play()\n+ player.pause()\n+ rejectPlay(abort)\n+ await expect(promise).resolves.toBeUndefined()\n+ })\n+\n test('volume and muted', () => {\n const media = createMedia()\n const player = new Player({ media })\n", "fail_to_pass": ["Player pause before play promise resolves does not reject"], "pass_to_pass": ["Player play and pause", "Timer start schedules ticks", "Renderer getPixelRatio returns positive", "WaveSurfer public methods destroy cleans up renderer and timer", "EventEmitter unAll", "WaveSurfer public methods wrapper and scroll helpers call renderer", "Renderer parentFromOptionsContainer returns element and throws", "Player volume and muted", "Player setTime clamps to duration", "Renderer getHeight calculates values", "WaveSurfer public methods create returns instance", "WaveSurfer public methods getDuration falls back to decoded data", "WaveSurfer public methods zoom requires decoded data", "EventEmitter once", "Renderer renderSingleCanvas appends canvases", "WaveSurfer public methods load and loadBlob call loadAudio", "Renderer reRender keeps scroll position", "Renderer renderMultiCanvas draws and subscribes", "Player setSinkId uses media method", "Renderer convertColorValues supports gradients", "WaveSurfer public methods registerPlugin adds and removes plugin", "BasePlugin _init calls onInit and sets wavesurfer", "Renderer initHtml creates shadow root", "createElement creates DOM structure", "Renderer createDelay resolves after time", "WaveSurfer public methods skip and empty", "WaveSurfer public methods stop resets time", "Renderer renderBarWaveform and renderLineWaveform draw on context", "EventEmitter on and emit", "WaveSurfer public methods setMediaElement reinitializes events", "WaveSurfer public methods play sets start and end", "Renderer scrollIntoView updates scroll", "BasePlugin destroy emits destroy and unsubscribes", "WaveSurfer public methods setOptions merges options and updates renderer", "WaveSurfer public methods seekTo calculates correct time", "WaveSurfer public methods getDecodedData returns buffer", "Fetcher fetchBlob returns blob and reports progress", "Renderer destroy cleans up", "Renderer zoom updates option", "WaveSurfer public methods exportPeaks reads data from buffer", "makeDraggable invokes callbacks on drag", "WaveSurfer public methods exportImage uses renderer", "WaveSurfer public methods toggleInteraction sets option", "WaveSurfer public methods setTime updates progress and emits event", "Renderer renderChannel creates containers", "WaveSurfer public methods playPause toggles play and pause", "Renderer render processes audio buffer", "Renderer renderProgress updates styles", "Renderer renderWaveform chooses rendering path", "Renderer exportImage returns data"], "test_cmds": ["yarn test:unit --json --outputFile=jest-results.json"], "log_parser": "def parser(log: str) -> dict[str, str]:\n # Improved robust parser for Jest (and some textual) outputs\n import json\n import re\n\n def map_status(s: str) -> str:\n s = (s or \"\").strip().lower()\n if s in (\"passed\", \"pass\", \"ok\", \"success\", \"succeeded\", \"successful\"):\n return \"pass\"\n if s in (\n \"failed\",\n \"fail\",\n \"error\",\n \"xfailed\",\n \"xfail\",\n \"xpass\",\n \"broken\",\n \"fatal\",\n ):\n return \"fail\"\n if s in (\"skipped\", \"skip\", \"pending\", \"todo\", \"disabled\", \"ignored\"):\n return \"skip\"\n # Default to fail for unknown statuses per requirements\n return \"fail\"\n\n def combine_status(old: str | None, new: str) -> str:\n # Prefer worst severity: fail > skip > pass\n if old is None:\n return new\n if old == \"fail\" or new == \"fail\":\n return \"fail\"\n if old == \"skip\" or new == \"skip\":\n return \"skip\"\n return \"pass\"\n\n results: dict[str, str] = {}\n\n # First, try direct JSON parsing (for pure JSON logs)\n try:\n data = json.loads(log)\n if isinstance(data, dict) and \"testResults\" in data:\n for suite in data.get(\"testResults\", []):\n for ar in suite.get(\"assertionResults\", []):\n name = ar.get(\"fullName\") or ar.get(\"title\")\n if not name:\n # Reconstruct from ancestors + title if possible\n ancestors = ar.get(\"ancestorTitles\") or []\n title = ar.get(\"title\") or \"\"\n parts = [*ancestors, title]\n name = \" \".join([p for p in parts if p])\n status = map_status(ar.get(\"status\"))\n if name:\n results[name] = combine_status(results.get(name), status)\n if results:\n return results\n except Exception:\n pass\n\n # If not pure JSON, extract all top-level JSON objects and parse those with testResults\n def extract_json_objects(text: str) -> list[str]:\n objs = []\n in_string = False\n escape = False\n brace_count = 0\n start = None\n for i, ch in enumerate(text):\n if in_string:\n if escape:\n escape = False\n elif ch == \"\\\\\":\n escape = True\n elif ch == '\"':\n in_string = False\n continue\n else:\n if ch == '\"':\n in_string = True\n elif ch == \"{\":\n if brace_count == 0:\n start = i\n brace_count += 1\n elif ch == \"}\":\n if brace_count > 0:\n brace_count -= 1\n if brace_count == 0 and start is not None:\n objs.append(text[start : i + 1])\n start = None\n return objs\n\n for obj in extract_json_objects(log):\n try:\n data = json.loads(obj)\n if isinstance(data, dict) and \"testResults\" in data:\n for suite in data.get(\"testResults\", []):\n for ar in suite.get(\"assertionResults\", []):\n name = ar.get(\"fullName\") or ar.get(\"title\")\n if not name:\n ancestors = ar.get(\"ancestorTitles\") or []\n title = ar.get(\"title\") or \"\"\n parts = [*ancestors, title]\n name = \" \".join([p for p in parts if p])\n status = map_status(ar.get(\"status\"))\n if name:\n results[name] = combine_status(results.get(name), status)\n except Exception:\n continue\n if results:\n return results\n\n # Fallback: regex to find JSON-like fullName/status pairs\n # This can capture tests even when the JSON is truncated or embedded.\n for m in re.finditer(\n r'\"fullName\"\\s*:\\s*\"([^\"]+)\"[^}]*?\"status\"\\s*:\\s*\"([A-Za-z]+)\"',\n log,\n re.DOTALL,\n ):\n full_name, status = m.groups()\n results[full_name] = combine_status(results.get(full_name), map_status(status))\n\n # Fallback: reconstruct names from ancestorTitles + title + status in JSON-like text\n if not results:\n for m in re.finditer(\n r'\"ancestorTitles\"\\s*:\\s*\\[(.*?)\\]\\s*,[^}]*?\"title\"\\s*:\\s*\"([^\"]+)\"\\s*,[^}]*?\"status\"\\s*:\\s*\"([A-Za-z]+)\"',\n log,\n re.DOTALL,\n ):\n ancestors_raw, title, status = m.groups()\n suites = re.findall(r'\"([^\"]+)\"', ancestors_raw) if ancestors_raw else []\n name = \" \".join(suites + [title]) if suites else title\n if name:\n results[name] = combine_status(results.get(name), map_status(status))\n\n # Additional textual fallback for Jest CLI outputs using symbols \u2713, \u2715, \u25cb\n # These lines often look like: \"\u2713 test name (xx ms)\"\n # We'll capture name up to any trailing parenthesis.\n if not results:\n # Pass (\u2713 or \u2714)\n for m in re.finditer(r'^[\\s]*[\u2713\u2714]\\s+(.+?)(?:\\s+\\([^)]*\\))?\\s*$', log, re.MULTILINE):\n name = m.group(1).strip()\n if name:\n results[name] = combine_status(results.get(name), \"pass\")\n # Fail (\u2715 or \u00d7)\n for m in re.finditer(r'^[\\s]*[\u2715\u00d7]\\s+(.+?)(?:\\s+\\([^)]*\\))?\\s*$', log, re.MULTILINE):\n name = m.group(1).strip()\n if name:\n results[name] = combine_status(results.get(name), \"fail\")\n # Skip (\u25cb)\n for m in re.finditer(r'^[\\s]*[\u25cb]\\s+(.+?)(?:\\s+\\([^)]*\\))?\\s*$', log, re.MULTILINE):\n name = m.group(1).strip()\n if name:\n results[name] = combine_status(results.get(name), \"skip\")\n\n return results", "docker_image": "starryzhang/sweb.eval.x86_64.katspaugh_1776_wavesurfer.js-4166", "context_files": null} {"id": "patchbench-ts-real-0014", "language": "typescript", "source": "real", "origin": "swe-bench-live-multilang", "upstream_instance_id": "openapi-ts__openapi-typescript-2365", "repo": "openapi-ts/openapi-typescript", "base_commit": "99c346e06bb41511338d2a8c3752748e5d52a742", "issue_text": "Parameters storage is not fulfilled by parameters provided in ApiOperation\nhttps://github.com/openapi-ts/openapi-typescript/blob/99c346e06bb41511338d2a8c3752748e5d52a742/packages/openapi-metadata/src/decorators/api-operation.ts#L13\n\nthus the parameters are not generated when specified\n\n```typescript\n @ApiOperation({\n summary: 'Gets user by id',\n methods: ['get'],\n path: '/users/{id}',\n parameters: [\n {\n name: 'id',\n in: 'path',\n required: true,\n example: 1,\n schema: {\n type: 'integer',\n minimum: 1\n }\n }\n ]\n })\n show(id: string): User {\n return {\n id,\n name: '',\n email: ''\n };\n }\n```\n\nActual Result:\n```json\n{\n \"paths\": {\n \"/users/{id}\": {\n \"get\": {\n \"summary\": \"Gets user by id\",\n \"parameters\": [],\n \"responses\": {},\n \"security\": []\n }\n }\n }\n}\n```\n\nExpected Result: \n```json\n{\n{\n \"paths\": {\n \"/users/{id}\": {\n \"get\": {\n \"summary\": \"Gets user by id\",\n \"parameters\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"example\": 1,\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n }\n ],\n \"responses\": {},\n \"security\": []\n }\n }\n }\n}\n```\n", "hints_text": "\n\n", "gold_patch": "diff --git a/.changeset/itchy-jobs-create.md b/.changeset/itchy-jobs-create.md\nnew file mode 100644\nindex 000000000..2b9fe311c\n--- /dev/null\n+++ b/.changeset/itchy-jobs-create.md\n@@ -0,0 +1,5 @@\n+---\n+\"openapi-metadata\": patch\n+---\n+\n+fix(#2364) for allowing to add params via ApiOperation tag\ndiff --git a/packages/openapi-metadata/src/decorators/api-operation.ts b/packages/openapi-metadata/src/decorators/api-operation.ts\nindex 99d210fc8..58995aa14 100644\n--- a/packages/openapi-metadata/src/decorators/api-operation.ts\n+++ b/packages/openapi-metadata/src/decorators/api-operation.ts\n@@ -1,4 +1,8 @@\n-import { type OperationMetadata, OperationMetadataStorage } from \"../metadata/operation.js\";\n+import {\n+ type OperationMetadata,\n+ OperationMetadataStorage,\n+ OperationParameterMetadataStorage,\n+} from \"../metadata/index.js\";\n \n export type ApiOperationOptions = OperationMetadata;\n \n@@ -11,5 +15,8 @@ export type ApiOperationOptions = OperationMetadata;\n export function ApiOperation(options: ApiOperationOptions): MethodDecorator {\n return (target, propertyKey) => {\n OperationMetadataStorage.defineMetadata(target, options, propertyKey);\n+ if (Array.isArray(options.parameters)) {\n+ OperationParameterMetadataStorage.mergeMetadata(target, options.parameters, propertyKey);\n+ }\n };\n }\ndiff --git a/packages/openapi-metadata/src/metadata/operation.ts b/packages/openapi-metadata/src/metadata/operation.ts\nindex a2aafe188..4363a41b8 100644\n--- a/packages/openapi-metadata/src/metadata/operation.ts\n+++ b/packages/openapi-metadata/src/metadata/operation.ts\n@@ -1,8 +1,9 @@\n import type { OpenAPIV3 } from \"openapi-types\";\n import type { HttpMethods } from \"../types.js\";\n import { createMetadataStorage } from \"./factory.js\";\n+import type { OperationParameterMetadata } from \"./operation-parameter.js\";\n \n-export type OperationMetadata = Omit & {\n+export type OperationMetadata = Omit & {\n /**\n * Operation path.\n * Can include parameters.\n@@ -13,6 +14,11 @@ export type OperationMetadata = Omit & {\n * Available methods for this operation.\n */\n methods?: HttpMethods[];\n+\n+ /**\n+ * Represents metadata about an operation parameter.\n+ */\n+ parameters?: OperationParameterMetadata[];\n };\n \n export const OperationMetadataKey = Symbol(\"Operation\");\n", "test_patch": "diff --git a/packages/openapi-metadata/test/decorators.test.ts b/packages/openapi-metadata/test/decorators.test.ts\nindex b193be263..87633bb82 100644\n--- a/packages/openapi-metadata/test/decorators.test.ts\n+++ b/packages/openapi-metadata/test/decorators.test.ts\n@@ -1,11 +1,15 @@\n import \"reflect-metadata\";\n import {\n+ ApiBasicAuth,\n+ ApiBearerAuth,\n ApiBody,\n ApiCookie,\n+ ApiCookieAuth,\n ApiExcludeController,\n ApiExcludeOperation,\n ApiExtraModels,\n ApiHeader,\n+ ApiOauth2,\n ApiOperation,\n ApiParam,\n ApiProperty,\n@@ -19,26 +23,40 @@ import {\n ExtraModelsMetadataStorage,\n OperationBodyMetadataStorage,\n OperationMetadataStorage,\n+ type OperationParameterMetadata,\n OperationParameterMetadataStorage,\n OperationResponseMetadataStorage,\n OperationSecurityMetadataStorage,\n PropertyMetadataStorage,\n } from \"../src/metadata/index.js\";\n-import { ApiBasicAuth, ApiBearerAuth, ApiCookieAuth, ApiOauth2 } from \"../src/decorators/api-security.js\";\n \n test(\"@ApiOperation\", () => {\n+ const parameters: OperationParameterMetadata[] = [\n+ {\n+ in: \"path\",\n+ name: \"id\",\n+ },\n+ ] as const;\n+\n class MyController {\n- @ApiOperation({ summary: \"Hello\", path: \"/test\", methods: [\"get\"] })\n+ @ApiOperation({\n+ summary: \"Hello\",\n+ path: \"/test\",\n+ methods: [\"get\"],\n+ parameters,\n+ })\n operation() {}\n }\n \n- const metadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n-\n- expect(metadata).toEqual({\n+ const operationMetadata = OperationMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n+ const parameterMetadata = OperationParameterMetadataStorage.getMetadata(MyController.prototype, \"operation\");\n+ expect(operationMetadata).toEqual({\n summary: \"Hello\",\n path: \"/test\",\n methods: [\"get\"],\n+ parameters,\n });\n+ expect(parameterMetadata).toEqual(parameters);\n });\n \n test(\"@ApiBody\", () => {\n", "fail_to_pass": ["@ApiOperation"], "pass_to_pass": ["createClient options content-type provided default content-type for body-full requests - PUT, 0", "transformPathItemObject parameters > header and cookie have same name param1", "createClient options content-type implicit default content-type for body-full requests - OPTIONS, {}", "request request body `undefined` body (with body serializer) - OPTIONS", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - DELETE, 1", "params query querySerializer array spaceDelimited (explode)", "response data/error `default` is an error", "createClient options content-type provided default content-type for body-full requests - PUT, {}", "transformSchemaObject > object nullable", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - POST, null", "handles HEAD requests with non-zero Content-Length without parsing the body", "Node.js API snapshot > DigitalOcean", "tsEnum with setting: export", "client useQuery uses provided options", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - DELETE, null", "request request body `undefined` body (without body serializer) - PATCH", "openapiTS does not mutate original reference", "request request body `0` body (without body serializer) - PATCH", "types GetResponseContent MixedResponses returns all possible responses", "createClient options content-type implicit default content-type for body-full requests - POST, false", "request request body `undefined` body (without body serializer) - HEAD", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - OPTIONS, false", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PATCH, false", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - POST, false", "response data/error invalid path", "request request body missing body (without body serializer) - OPTIONS", "createClient options content-type implicit default content-type for body-full requests - PATCH, false", "types GetResponseContent MixedResponses returns all OK responses", "response data/error media union text/html", "createClient options content-type specified content-type for body-full requests - POST, {}", "OPTIONS sends the correct method", "openapiTS JSONSchema > $defs are respected", "getEntries options alphabetize: true", "tsEnum name from path", "request request body `false` body (with body serializer) - POST", "transformOperationObject parameters > root optional if no path params and no required params", "request request body `''` body (with body serializer) - DELETE", "request request body `''` body (without body serializer) - POST", "transformSchemaObject > object default > options.defaultNonNullable: false", "createClient options content-type specified content-type for body-full requests - OPTIONS, false", "createClient options content-type no content-type for body-less requests - POST", "transformSchemaObject > object additionalProperties > no properties", "CLI flags --help", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PUT, 0", "client useQuery handles undefined response with zero Content-Length by setting data and error to null", "createClient options content-type implicit default content-type for body-full requests - OPTIONS, false", "oapiRef single part", "transformSchemaObject > object const > number (falsy value)", "@ApiBody", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - DELETE, null", "@ApiSecurity", "createClient options content-type specified content-type for body-full requests - PATCH, 1", "can return response directly from onRequest", "oapiRef reference into paths parameters", "transformSchemaObject > string default + nullable (deprecated syntax)", "createClient options content-type specified content-type for body-full requests - OPTIONS, null", "createInfiniteHook passes correct fetcher to useSWRInfinite", "GET sends correct method", "createClient options content-type specified content-type for body-full requests - PUT, 1", "oapiRef component schema named `properties`", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - OPTIONS, false", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - POST, 0", "GET sends correct options, returns undefined on 204", "openapiTS Generates path parameters", "client useQuery handles undefined response with 204 No Content status by setting data and error to null", "composition discriminator > oneOf", "openapiTS $refs > arbitrary $refs are respected", "transformSchemaObject > string default + nullable", "params query querySerializer array pipeDelimited (explode)", "enum", "params path does not escape allowed characters in path segment", "params query querySerializer object form (explode)", "createMutateHook supports boolean for options argument", "request request body `undefined` body (without body serializer) - PUT", "createClient options content-type no content-type for `undefined` body requests - POST", "params query querySerializer object deepObject (explode)", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PATCH, {}", "composition allOf > basic", "createRef basic", "Node.js API options > pathParamsAsTypes > true", "createClient options content-type implicit default content-type for body-full requests - DELETE, null", "composition discriminator > oneOf + null + implicit mapping", "Invalid schemas Other missing required fields", "addJSDocComment single-line comment", "request request body `false` body (without body serializer) - DELETE", "request request body `null` body (without body serializer) - OPTIONS", "request request body missing body (without body serializer) - DELETE", "types SuccessResponse returns all 2XX responses", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - POST, {}", "request request body missing body (without body serializer) - PATCH", "tsIsPrimitive object", "request request body `''` body (with body serializer) - PUT", "skips onResponse handlers when response is returned from onRequest", "tsEnum string members", "transformPathsObject $ref", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - POST, 0", "transformPathItemObject $ref", "tsEnum number members", "createClient options content-type specified content-type for body-full requests - OPTIONS, {}", "request request body `0` body (without body serializer) - DELETE", "createClient options content-type specified content-type for body-full requests - PATCH, false", "createClient options content-type implicit default content-type for body-full requests - POST, null", "createClient options content-type provided default content-type for body-full requests - OPTIONS, false", "params query querySerializer object deepObject", "transformPathsObjectToEnum basic with path parameter", "transformSchemaObject > array options > arrayLength: true > default", "types GetResponseContent MixedResponses returns correct type for 200 with json-like literal", "transformComponentsObject options > alphabetize: true", "composition discriminator > escape", "transformSchemaObject > number basic", "transformPathsObject options > alphabetize: true", "response parseAs stream", "tsUnion multiple (const)", "createMutateHook with lodash.isMatch as `compare` returns true when init is a subset of key init", "transformSchemaObject > object additionalProperties > true", "executes in expected order", "transformSchemaObject > empty/unknown true", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - DELETE, false", "createMutateHook useMutate -> mutate -> key matcher returns compare result when prefix and path are equal and init is given", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PATCH, 0", "tsEnum x-enum-varnames with numeric prefix", "request request body missing body (without body serializer) - HEAD", "transformSchemaObject > object options > immutable (string)", "DELETE returns empty object on 204", "transformComponentsObject options > excludeDeprecated: true", "openapiTS operations > # character is parsed correctly", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - POST, {}", "transformSchemaObject > object basic", "request request body `application/x-www-form-urlencoded` body", "addJSDocComment escapes internal comments", "createClient options content-type specified content-type for body-full requests - POST, 0", "string", "receives correct options", "client useMutation mutate should resolve data properly and have error as null when mutationFn returns null", "client useSuspenseQuery should resolve data properly and have error as null when successfull request", "request request body `0` body (without body serializer) - PUT", "DELETE sends the correct method", "tsIsPrimitive string", "transformSchemaObject > string enum (whitespace)", "params path allows UTF-8 characters", "@ApiExtraModels", "transformPathsObjectToEnum invalid method", "composition oneOf > string const", "POST sends correct options, returns success", "createClient options content-type provided default content-type for body-full requests - PATCH, null", "transformResponseObject empty", "YAML features not ignore path item components in paths", "openapiTS $refs > basic", "transformSchemaObject > string basic", "Node.js API options > transform", "transformSchemaObject > array options > arrayLength: true > minItems: 1", "transformSchemaObject > string enum (quotes)", "tsIsPrimitive null", "CLI snapshot > Stripe API", "params path serializes", "Node.js API options > transform with optional blob property", "request request body `false` body (with body serializer) - PATCH", "types ErrorResponse returns all 5XX and 4xx responses", "createPathBasedClient path based client provides a PathBasedClient type", "composition allOf > core properties", "client useQuery params should be required if OpenAPI schema requires params", "request request body `undefined` body (with body serializer) - PUT", "composition oneOf > number const", "transformPathItemObject basic", "openapiTS $refs > path object & paths enum", "params query querySerializer function per-request", "Node.js API options > transform with schema object", "request request body `null` body (with body serializer) - PATCH", "transformWebhooksObject $ref", "createClient options content-type specified content-type for body-full requests - DELETE, {}", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - POST, 1", "response data/error media union multiple", "params path typechecks (empty path params)", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - OPTIONS, {}", "request request body `undefined` body (without body serializer) - POST", "composition polymorphic > enum + nullable", "@ApiExcludeOperation", "client useMutation mutate should use provided custom queryClient", "createClient options content-type implicit default content-type for body-full requests - POST, 1", "transformRequestBodyObject POST data with default values", "Node.js API input > string > YAML", "createClient options content-type provided default content-type for body-full requests - OPTIONS, 1", "createClient options content-type provided default content-type for body-full requests - POST, 0", "types GetResponseContent MixedResponses returns correct type for 200 with application/json", "CLI snapshot > GitHub API (next)", "3.1 discriminators allOf > inline inheritance", "transformComponentsObject options > rootTypes: true", "transformSchemaObject > array nullable (deprecated syntax)", "openapiTS TypeScript > WithRequired type helper", "params query querySerializer array spaceDelimited", "transformOperationObject parameters, responses > test excludeDeprecated option", "createClient options content-type provided default content-type for body-full requests - DELETE, null", "transformSchemaObject > array nullable items (deprecated syntax)", "createClient options content-type implicit default content-type for body-full requests - PATCH, 0", "request uses provided Request class", "receives the original request", "request request body `0` body (without body serializer) - POST", "array with multiple items should warn", "request request body `undefined` body (without body serializer) - DELETE", "params query querySerializer primitives", "CLI snapshot > DigitalOcean", "request request body `0` body (with body serializer) - POST", "createClient options content-type provided default content-type for body-full requests - POST, null", "transformRequestBodyObject requestBodies -> POST data with default values", "client useQuery should resolve data properly and have error as null when queryFn returns null", "createClient options content-type no content-type for body-less requests - DELETE", "createClient options content-type specified content-type for body-full requests - POST, false", "transformSchemaObject > object const > string (inferred)", "raw schema", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - OPTIONS, 1", "types GetResponseContent MixedResponses non existent media type", "3.1 discriminators allOf > mapping", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PUT, 0", "request request body `null` body (with body serializer) - PUT", "client useMutation mutate should resolve data properly and have error as null when successfull request", "createClient options content-type provided default content-type for body-full requests - OPTIONS, 0", "createMutateHook useMutate -> mutate -> key matcher matches when prefix and path are equal and init isn't given", "createClient options content-type implicit default content-type for body-full requests - PUT, false", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PATCH, null", "createClient options content-type no content-type for body-less requests - OPTIONS", "request cookie header is preserved", "request request body `null` body (with body serializer) - POST", "baseUrl can be overridden", "Node.js API options > enum", "composition oneOf > nullable (deprecated syntax)", "Node.js API options > exportType > false", "request headers default headers are preserved", "tsIsPrimitive number", "createClient options content-type provided default content-type for body-full requests - DELETE, false", "openapiTS examples > skipped", "createInfiniteHook passes correct key loader to useSWRInfinite", "transformComponentsObject transform > with transform object", "request request body `null` body (without body serializer) - DELETE", "request request body `0` body (with body serializer) - DELETE", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PUT, {}", "createClient options content-type implicit default content-type for body-full requests - PATCH, null", "createClient options content-type implicit default content-type for body-full requests - DELETE, false", "transformRequestBodyObject empty", "receives a UUID per-request", "createClient options content-type provided default content-type for body-full requests - OPTIONS, null", "createMutateHook useMutate -> mutate -> key matcher returns false for non-array keys", "tsArrayLiteralExpression with setting: export", "isThunk", "request request body `0` body (with body serializer) - PUT", "Node.js API input > URL > local", "transformSchemaObject > object const > number", "simple class", "transformSchemaObject > number nullable (deprecated syntax)", "3.1 discriminators oneOf > explicit mapping > replace discriminator enum", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - DELETE, {}", "request request body `''` body (with body serializer) - PATCH", "transformSchemaObject > array nullable", "request request body `false` body (without body serializer) - PUT", "composition polymorphic > enum + nullable (null missing in enum, falsy value in enum", "openapiTS $refs > parameters get hoisted", "createClient options content-type implicit default content-type for body-full requests - PUT, 1", "composition enum > acting as oneOf", "transformSchemaObject > object options > excludeDeprecated: true", "request request body `null` body (without body serializer) - PUT", "POST multipart/form-data simple", "createClient options content-type no content-type for `undefined` body requests - OPTIONS", "params query querySerializer array pipeDelimited", "request request body `false` body (with body serializer) - PUT", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - DELETE, 0", "transformSchemaObject > boolean basic", "params query querySerializer array form", "request request body `null` body (without body serializer) - POST", "createPathBasedClient path based client GET (no params)", "client useMutation mutateAsync should use provided custom queryClient", "Node.js API options > dedupeEnums", "tsIsPrimitive boolean", "createClient options content-type no content-type for body-less requests - PUT", "transformSchemaObject > object options > additionalProperties: true", "transformSchemaObject > array options > immutable: true (tuple)", "createClient options content-type provided default content-type for body-full requests - PATCH, false", "github", "CLI Redocly config automatic config", "params path escapes reserved characters in path segment", "transformSchemaObject > array tuple > prefixItems", "CLI flags --version", "Invalid schemas OpenAPI < 3 throws", "request request body `''` body (without body serializer) - PUT", "transformPathsObject basic", "request request body `undefined` body (with body serializer) - DELETE", "createClient options content-type implicit default content-type for body-full requests - OPTIONS, 1", "client useInfiniteQuery should use return type from select option", "createClient options content-type provided default content-type for body-full requests - DELETE, 1", "transformSchemaObject > array options > arrayLength: true > maxItems: 20", "transformSchemaObject > boolean enum", "@ApiExcludeController", "params query querySerializer object form", "createClient options content-type specified content-type for body-full requests - DELETE, false", "TRACE() (not supported in Node.js)", "client useQuery handles undefined response with non-zero Content-Length (status 200) by setting error and undefined data", "addJSDocComment multi-line comment", "createClient options content-type implicit default content-type for body-full requests - OPTIONS, 0", "POST request body requestBody (inline)", "transformSchemaObject > object options > propertiesRequiredByDefault: true", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - DELETE, 0", "createClient options content-type provided default content-type for body-full requests - POST, {}", "composition oneOf > primitives", "request request body `undefined` body (with body serializer) - HEAD", "createClient options content-type provided default content-type for body-full requests - PUT, 1", "types GetResponseContent MixedResponses returns 200 & 500 responses", "GET gracefully handles invalid JSON for errors", "transformRequestBodyObject basic", "tsEnum number members with x-enum-descriptions", "stripe", "tsEnum string members with numeric prefix", "createClient options content-type specified content-type for body-full requests - OPTIONS, 0", "transformResponseObject basic", "createMutateHook invokes debug value hook with client prefix", "client useQuery should resolve error properly and have undefined data when failed request", "client queryOptions returns query options that can be passed to useSuspenseQuery", "POST request body requires necessary requestBodies", "createClient options content-type specified content-type for body-full requests - DELETE, 1", "tsEnum x-enum-varnames", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - DELETE, 1", "transformPathsObjectToEnum with and without operationId", "composition anyOf > basic", "request request body missing body (without body serializer) - PUT", "response data/error media union invalid", "Node.js API input > buffer", "request request body `0` body (with body serializer) - PATCH", "client useQuery should use provided custom queryClient", "empty array should warn", "request request body missing body (with body serializer) - OPTIONS", "client useQuery should infer correct data and error type", "can modify response", "createClient options content-type specified content-type for body-full requests - POST, null", "request request body missing body (without body serializer) - POST", "Node.js API options > exportType > true", "request request body `''` body (without body serializer) - OPTIONS", "request request body `false` body (without body serializer) - POST", "@ApiProperty", "composition oneOf > object with properties", "skips subsequent onRequest handlers when response is returned", "response data/error valid path", "createClient options content-type specified content-type for body-full requests - PUT, null", "response parseAs text", "tsUnion one", "configureBaseQueryHook invokes debug value hook with path", "request request body missing body (with body serializer) - PUT", "Node.js API input > object", "createClient options content-type implicit default content-type for body-full requests - PUT, {}", "transformSchemaObject > array options > arrayLength: true > maxItems: 2", "response data/error media union application/json", "request request body `false` body (with body serializer) - DELETE", "response data/error media union application/vnd.api+json", "CLI stdin", "tsPropertyIndex valid strings -> identifiers", "createClient options baseUrl per request causes no override on default baseUrl", "transformOperationObject supports XX codes", "tsUnion multiple (object types)", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PUT, null", "tsArrayLiteralExpression name from path", "createClient options content-type implicit default content-type for body-full requests - PUT, 0", "response parseAs use the selected content", "composition oneOf > polymorphic", "createImmutableHook creates factory function using useSWRImmutable", "createClient options content-type specified content-type for body-full requests - PUT, {}", "request request body `undefined` body (with body serializer) - PATCH", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PUT, {}", "transformPathItemObject options > excludeDeprecated: true", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - OPTIONS, null", "createRef escapes", "createClient options content-type specified content-type for body-full requests - DELETE, null", "transformPathsObjectToEnum basic", "PUT sends the correct method", "requestInitExt", "createClient options baseUrl per request", "openapiTS $refs > path object", "transformWebhooksObject basic", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PATCH, null", "request request body `null` body (with body serializer) - DELETE", "types GetResponseContent MixedResponses returns correct type for 200 with literal", "transformSchemaObject > object const > number (inferred)", "createClient options content-type provided default content-type for body-full requests - DELETE, {}", "response response object 404", "createClient options content-type implicit default content-type for body-full requests - DELETE, {}", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PATCH, 1", "response data/error returns union for mismatched response", "transformSchemaObject > empty/unknown empty object", "transformOperationObject parameters > root not optional if any path params", "transformSchemaObject > object options > two-dimensional array", "response response object 500", "composition discriminator > allOf", "client useQuery should infer correct data when used with select property", "transformSchemaObject > string enum (UTF-8)", "request request body missing body (without body serializer) - GET", "client queryOptions has correct parameter types", "receives OpenAPI options passed in from parent", "client queryOptions returns query options that can be passed to useQueries", "createClient options content-type implicit default content-type for body-full requests - PATCH, {}", "GET sends correct options, returns success", "transformSchemaObject > string nullable (deprecated syntax)", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - OPTIONS, null", "transformSchemaObject > string enum", "transformComponentsObject basic", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PATCH, 1", "createClient options content-type specified content-type for body-full requests - OPTIONS, 1", "types ErrorResponse returns all 5XX and 4xx responses, only application/json", "POST request body requestBody with required: false", "Node.js API input > string > JSON", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - POST, false", "client useQuery passes abort signal to fetch", "tsPropertyIndex numbers -> number literals", "params query querySerializer array form (explode)", "client useMutation mutateAsync should resolve data properly", "params path typechecks", "tsIsPrimitive array", "response response object 200", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - OPTIONS, 0", "request request body `false` body (without body serializer) - PATCH", "transformSchemaObject > object property > boolean", "tsUnion none", "POST sends the correct method", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PUT, false", "client useInfiniteQuery should reverse pages and pageParams when using the select option", "transformPathsObject options > pathParamsAsTypes: true", "transformComponentsObject options > immutable: true", "transformSchemaObject > string enum + nullable + null value", "request request body `''` body (with body serializer) - POST", "client queryOptions returns query options that can resolve data correctly with fetchQuery", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PATCH, 0", "CLI snapshot > GitHub API (root types)", "createMutateHook useMutate -> mutate -> key matcher returns false for arrays with length !== 3", "configureBaseQueryHook passes correct key to useSWR", "request request body `''` body (with body serializer) - OPTIONS", "request sends correct method", "transformSchemaObject > object nullable (deprecated syntax)", "createClient options content-type implicit default content-type for body-full requests - DELETE, 0", "params query querySerializer array params (empty, multiple)", "createInfiniteHook invokes debug value hook with path", "transformSchemaObject > object additionalProperties > basic", "transformSchemaObject > array options > immutable: true", "createQueryHook creates factory function using useSWR", "composition discriminator > automatic propertyName", "createClient options content-type specified content-type for body-full requests - PATCH, 0", "transformSchemaObject > object x-* properties > ignored", "transformSchemaObject > array ref", "request request body `undefined` body (with body serializer) - GET", "composition allOf > sibling required", "primitive", "model", "getEntries operates like Object.entries()", "Node.js API options > pathParamsAsTypes > false", "GET sends correct options, returns error", "createClient options content-type implicit default content-type for body-full requests - PATCH, 1", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - OPTIONS, {}", "constructor", "request request body `undefined` body (without body serializer) - OPTIONS", "createClient options baseUrl removes trailing slash", "request request body `null` body (with body serializer) - OPTIONS", "request request body `false` body (with body serializer) - OPTIONS", "transformSchemaObject > object additionalProperties > empty object", "openapiTS nullable > 3.1 syntax", "params query querySerializer array params (empty)", "@ApiQuery", "createClient options content-type no content-type for `undefined` body requests - HEAD", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PUT, 1", "createClient options content-type specified content-type for body-full requests - PUT, false", "@ApiResponse", "request request body `0` body (without body serializer) - OPTIONS", "client queryOptions returns query options without an init", "createClient options content-type implicit default content-type for body-full requests - POST, {}", "tsArrayLiteralExpression number members", "Node.js API snapshot > Octokit GHES 3.6 Diff to API", "client useSuspenseQuery passes abort signal to fetch", "createClient options content-type specified content-type for body-full requests - DELETE, 0", "CLI snapshot > GitHub API", "CLI snapshot > GitHub API (immutable)", "transformSchemaObject > array boolean items", "tsEnum replace special character", "can be skipped without interrupting request", "createClient options content-type provided default content-type for body-full requests - DELETE, 0", "openapiTS $refs > YAML anchors", "transformSchemaObject > array tuple > tuple items", "transformSchemaObject > number enum", "composition polymorphic > nullable", "request request body `undefined` body (with body serializer) - POST", "transformSchemaObject > empty/unknown false", "Node.js API options > postTransform", "createClient options content-type provided default content-type for body-full requests - OPTIONS, {}", "@ApiParam", "transformSchemaObject > string enum (inferred)", "tsArrayLiteralExpression with setting: readonly", "composition discriminator > oneOf inside object", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PUT, 1", "params query querySerializer empty/null params", "params header per-request", "Node.js API options > transform with blob", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - POST, 1", "request can attach custom properties to request", "client useInfiniteQuery should use custom cursor params", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - DELETE, false", "params query querySerializer ignores leading ? characters", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - DELETE, {}", "PATCH sends the correct method", "can modify errors", "transformSchemaObject > object options > emptyObjectsUnknown: true", "createClient options content-type no content-type for `undefined` body requests - DELETE", "POST multipart/form-data file", "oapiRef `properties` of component schema `properties`", "createClient options content-type provided default content-type for body-full requests - PATCH, {}", "Invalid schemas Unresolved $ref error messages", "YAML features merge", "request request body `undefined` body (without body serializer) - GET", "CLI flags --properties-required-by-default", "CLI snapshot > Octokit GHES 3.6 Diff to API", "Node.js API snapshot > Stripe", "createClient options content-type implicit default content-type for body-full requests - PUT, null", "request request body `false` body (without body serializer) - OPTIONS", "tsPropertyIndex invalid strings -> string literals", "CLI snapshot > GitHub API (types + immutable)", "response parseAs arrayBuffer", "Invalid schemas Swagger 2.0 throws", "request headers supports arrays", "transformSchemaObject > string nullable", "response data/error returns union for mismatched\u00a0errors", "tsEnum x-enum-descriptions with x-enum-varnames", "tsArrayLiteralExpression string members", "Node.js API options > enumValues", "createClient options content-type specified content-type for body-full requests - PATCH, {}", "transformRequestBodyObject no-content", "transformOperationObject defaultNonNullable > parameters aren\u2019t required even with defaults", "transformSchemaObject > array basic", "response parseAs blob", "composition oneOf > nullable", "3.1 discriminators allOf > no mapping", "createClient options content-type provided default content-type for body-full requests - POST, 1", "transformSchemaObject > string default + nullable + enum", "client useQuery should resolve data properly and have error as null when successful request", "createPathBasedClient path based client GET (params)", "can be ejected", "request sends correct method with params", "DELETE returns undefined on Content-Length: 0", "request request body missing body (with body serializer) - GET", "transformHeaderObject basic", "simple schema", "simple array", "GET handles empty-array-type 204 response", "getEntries options excludeDeprecated: true", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - PUT, null", "transformSchemaObject > object const > string", "createClient options content-type no content-type for `undefined` body requests - PUT", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PUT, false", "auth header", "createClient options content-type provided default content-type for body-full requests - PUT, null", "configureBaseQueryHook passes correct fetcher to useSWR", "types SuccessResponse returns all 2XX responses, only application/json", "createClient options content-type no content-type for `undefined` body requests - PATCH", "transformSchemaObject > boolean nullable", "createClient options content-type no content-type for `undefined` body requests - GET", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - OPTIONS, 1", "tsUnion multiple (primitive)", "client useSuspenseQuery should properly propagate error to suspense with a failed http request", "3.1 discriminators oneOf > implicit mapping", "transformComponentsObject options > rootTypes: true and rootTypesNoSchemaPrefix: true", "transformSchemaObject > object JSONSchema > $defs", "createClient options content-type specified content-type for body-full requests, even when default is suppressed - POST, null", "transformSchemaObject > object default", "createClient options content-type provided default content-type for body-full requests - PUT, false", "GET handles array-type responses", "request request body `0` body (with body serializer) - OPTIONS", "createClient options content-type no content-type for body-less requests - PATCH", "createClient options content-type specified content-type for body-full requests - PATCH, null", "transformSchemaObject > array nullable items", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - OPTIONS, 0", "createRef handles partial paths", "composition polymorphic > enum + nullable (null missing in enum)", "client useMutation mutateAsync should throw an error when failed request", "returns original errors if nothing is returned", "request request body missing body (with body serializer) - POST", "createClient options content-type no content-type for body-less requests - HEAD", "transformSchemaObject > object empty", "client useInfiniteQuery should fetch data correctly with pagination and include cursor", "createClient options content-type provided default content-type for body-full requests - PATCH, 0", "request request body `''` body (without body serializer) - PATCH", "request request body missing body (with body serializer) - DELETE", "oapiRef multiple parts", "transformPathItemObject operations", "request headers arbitrary headers are allowed on any request", "createClient options baseUrl", "createClient options content-type no content-type for body-less requests - GET", "transformSchemaObject > string enum + nullable (deprecated syntax)", "configureBaseQueryHook passes correct config to useSWR", "transformSchemaObject > string enum + nullable", "can modify request", "tsEnum partial x-enum-varnames and x-enum-descriptions", "transformSchemaObject > number nullable", "createClient options content-type provided default content-type for body-full requests - PATCH, 1", "request request body `null` body (without body serializer) - PATCH", "createClient options content-type provided default content-type for body-full requests - POST, false", "createClient options content-type implicit default content-type for body-full requests - POST, 0", "@ApiTags", "createMutateHook returns callback that invokes swr `mutate` with fn, data and options", "createClient options content-type implicit default content-type for body-full requests - DELETE, 1", "executes error handlers in expected order", "client useMutation mutate should resolve error properly and have undefined data when failed request", "client queryOptions returns query options that can be passed to useQuery", "transformComponentsObject all optional parameters", "openapiTS inject option", "createInfiniteHook passes correct config to useSWRInfinite", "transformResponseObject no-content", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PATCH, {}", "request headers default headers can be overridden", "client useMutation mutate should resolve data properly and have error as null when mutationFn returns undefined", "composition oneOf > object without properties", "@ApiCookie", "3.1 discriminators oneOf > explicit mapping > append enum in allOf", "createClient options content-type specified content-type for body-full requests - POST, 1", "can catch errors and return a response instead", "openapiTS nullable > 3.0 syntax", "transformSchemaObject > array options > arrayLength: true > minItems: 2, maxItems: 2", "createClient options content-type specified content-type for body-full requests - PUT, 0", "client generates all proper functions", "preserves (and can safely add) headers", "createClient options content-type native-fetch default content-type for body-full requests, when default is suppressed - PATCH, false", "type error occurs only when neither onRequest nor onResponse is specified", "request request body missing body (with body serializer) - HEAD", "@ApiHeader", "request request body missing body (with body serializer) - PATCH", "params query querySerializer allowReserved", "transformSchemaObject > object options > immutable (array)", "params query querySerializer function global default", "transformPathsObjectToEnum with operationId", "sends the correct method", "array", "createClient options content-type implicit default content-type for body-full requests - OPTIONS, null", "request request body `''` body (without body serializer) - DELETE", "transformSchemaObject > object options > propertiesRequiredByDefault: true + array", "transformSchemaObject > number integer", "transformComponentsObject $ref nested properties", "types GetResponseContent picks undefined over never", "client useSuspenseQuery should use provided custom queryClient", "transformSchemaObject > boolean nullable (deprecated syntax)", "openapiTS parameters > operations get correct params"], "test_cmds": ["mkdir -p reports && pnpm exec vitest run --reporter=json 2>&1 | tee reports/vitest-results.json"], "log_parser": "def parser(log: str) -> dict[str, str]:\n import re\n import json\n\n results: dict[str, str] = {}\n\n def norm(status: str) -> str:\n s = status.lower()\n if s in (\"passed\", \"pass\", \"success\"):\n return \"pass\"\n if s in (\"failed\", \"fail\", \"error\", \"xfailed\", \"xpass\"):\n return \"fail\"\n if s in (\"skipped\", \"pending\", \"todo\", \"skip\"):\n return \"skip\"\n return \"fail\" if \"fail\" in s else \"pass\" if \"pass\" in s else \"skip\"\n\n # Extract per-test results from JSON-like lines\n pattern1 = re.compile(\n r'\"fullName\"\\s*:\\s*\"([^\"]+)\"\\s*,\\s*\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"',\n re.IGNORECASE,\n )\n pattern2 = re.compile(\n r'\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"\\s*,\\s*\"fullName\"\\s*:\\s*\"([^\"]+)\"',\n re.IGNORECASE,\n )\n\n found = False\n for m in pattern1.finditer(log):\n full, status = m.groups()\n results[full] = norm(status)\n found = True\n for m in pattern2.finditer(log):\n status, full = m.groups()\n results[full] = norm(status)\n found = True\n\n if found:\n return results\n\n # Fallback: try to parse the enclosing JSON block if available\n try:\n idx = log.rfind('\"testResults\"')\n if idx != -1:\n start = log.rfind(\"{\", 0, idx)\n if start != -1:\n brace = 0\n end = None\n for i in range(start, len(log)):\n ch = log[i]\n if ch == \"{\":\n brace += 1\n elif ch == \"}\":\n brace -= 1\n if brace == 0:\n end = i + 1\n break\n if end:\n block = log[start:end]\n data = json.loads(block)\n for suite in data.get(\"testResults\", []):\n for ar in suite.get(\"assertionResults\", []):\n name = ar.get(\"fullName\") or ar.get(\"title\")\n status = ar.get(\"status\", \"\")\n if name:\n results[name] = norm(status)\n if results:\n return results\n except Exception:\n pass\n\n # Final fallback: title + status pairs\n pattern_title = re.compile(\n r'\"title\"\\s*:\\s*\"([^\"]+)\"\\s*,\\s*\"status\"\\s*:\\s*\"(passed|failed|skipped|pending|todo)\"',\n re.IGNORECASE,\n )\n for m in pattern_title.finditer(log):\n title, status = m.groups()\n results[title] = norm(status)\n\n return results", "docker_image": "starryzhang/sweb.eval.x86_64.openapi-ts_1776_openapi-typescript-2365", "context_files": null} {"id": "patchbench-ts-real-0003", "language": "typescript", "source": "real", "origin": "swe-bench-live-multilang", "upstream_instance_id": "firefox-devtools__profiler-5512", "repo": "firefox-devtools/profiler", "base_commit": "1e003443d4d96b017c4c798c54d7551e7122f50d", "issue_text": "The line numbers in marker stacks (shown in the tooltip or in the sidebar) should be the line number of the frame, not the line number where the function starts\nHere is an example profile: https://perfht.ml/2LwnxbS\n\nIn the cause for the \"reflow\" marker, the line number `24` is where the function has been defined, instead of the actual line inside this function that triggers this synchronous reflow.\n\nThis profile was taken from the testcase in https://everlong.org/mozilla/testcase-reflow-sync.html.\n\n\n\n\u2506Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-58)\n\n", "hints_text": "We can make use of the frameTable's `line` column here. This column is otherwise unused in perf.html at the moment. It contains the line number of the frame's executed line of JavaScript for JS interpreter frames, and is `null` otherwise. [Bug 1441689](https://bugzilla.mozilla.org/show_bug.cgi?id=1441689) tracks adding this information for JS JIT frames as well.\nYeah, the current code is:\r\nhttps://github.com/devtools-html/perf.html/blob/9934bc950d25e5baf88ebb5179d5d5363288ff4e/src/components/shared/Backtrace.js#L42-L47\r\n\r\nWe currently use the funcTable to get the information in:\r\nhttps://github.com/devtools-html/perf.html/blob/9934bc950d25e5baf88ebb5179d5d5363288ff4e/src/profile-logic/profile-data.js#L1614-L1617\n\n", "gold_patch": "diff --git a/src/components/shared/Backtrace.js b/src/components/shared/Backtrace.js\nindex 3a4bcce046..86d8f76b92 100644\n--- a/src/components/shared/Backtrace.js\n+++ b/src/components/shared/Backtrace.js\n@@ -6,11 +6,7 @@\n \n import React from 'react';\n import classNames from 'classnames';\n-import { filterCallNodeAndCategoryPathByImplementation } from 'firefox-profiler/profile-logic/transforms';\n-import {\n- getFuncNamesAndOriginsForPath,\n- convertStackToCallNodeAndCategoryPath,\n-} from 'firefox-profiler/profile-logic/profile-data';\n+import { getBacktraceItemsForStack } from 'firefox-profiler/profile-logic/transforms';\n \n import type {\n CategoryList,\n@@ -34,15 +30,11 @@ type Props = {|\n export function Backtrace(props: Props) {\n const { stackIndex, thread, implementationFilter, maxStacks, categories } =\n props;\n- const callNodePath = filterCallNodeAndCategoryPathByImplementation(\n- thread,\n+ const funcNamesAndOrigins = getBacktraceItemsForStack(\n+ stackIndex,\n implementationFilter,\n- convertStackToCallNodeAndCategoryPath(thread, stackIndex)\n- );\n- const funcNamesAndOrigins = getFuncNamesAndOriginsForPath(\n- callNodePath,\n thread\n- ).reverse();\n+ );\n \n if (funcNamesAndOrigins.length) {\n return (\ndiff --git a/src/components/shared/MarkerContextMenu.js b/src/components/shared/MarkerContextMenu.js\nindex a6318580c2..8915eeecfd 100644\n--- a/src/components/shared/MarkerContextMenu.js\n+++ b/src/components/shared/MarkerContextMenu.js\n@@ -42,11 +42,7 @@ import type {\n import type { ConnectedProps } from 'firefox-profiler/utils/connect';\n import { getImplementationFilter } from 'firefox-profiler/selectors/url-state';\n \n-import { filterCallNodeAndCategoryPathByImplementation } from 'firefox-profiler/profile-logic/transforms';\n-import {\n- convertStackToCallNodeAndCategoryPath,\n- getFuncNamesAndOriginsForPath,\n-} from 'firefox-profiler/profile-logic/profile-data';\n+import { getBacktraceItemsForStack } from 'firefox-profiler/profile-logic/transforms';\n import { getThreadSelectorsFromThreadsKey } from 'firefox-profiler/selectors/per-thread';\n \n import './MarkerContextMenu.css';\n@@ -161,13 +157,12 @@ class MarkerContextMenuImpl extends PureComponent {\n return '';\n }\n \n- const path = filterCallNodeAndCategoryPathByImplementation(\n- thread,\n+ const funcNamesAndOrigins = getBacktraceItemsForStack(\n+ stack,\n implementationFilter,\n- convertStackToCallNodeAndCategoryPath(thread, stack)\n- );\n+ thread\n+ ).reverse();\n \n- const funcNamesAndOrigins = getFuncNamesAndOriginsForPath(path, thread);\n return funcNamesAndOrigins\n .map(({ funcName, origin }) => `${funcName} [${origin}]`)\n .join('\\n');\ndiff --git a/src/components/shared/SampleTooltipContents.js b/src/components/shared/SampleTooltipContents.js\nindex cd7c6a247c..39d2cd24b0 100644\n--- a/src/components/shared/SampleTooltipContents.js\n+++ b/src/components/shared/SampleTooltipContents.js\n@@ -9,8 +9,7 @@ import { Backtrace } from './Backtrace';\n import { TooltipDetailSeparator } from '../tooltip/TooltipDetails';\n import {\n getCategoryPairLabel,\n- getFuncNamesAndOriginsForPath,\n- convertStackToCallNodeAndCategoryPath,\n+ isSampleWithNonEmptyStack,\n } from 'firefox-profiler/profile-logic/profile-data';\n import { getFormattedTimelineValue } from 'firefox-profiler/profile-logic/committed-ranges';\n import {\n@@ -26,7 +25,6 @@ import type {\n Milliseconds,\n } from 'firefox-profiler/types';\n import type { CpuRatioInTimeRange } from './thread/ActivityGraphFills';\n-import { ensureExists } from '../../utils/flow';\n \n type CPUProps = CpuRatioInTimeRange;\n \n@@ -134,21 +132,10 @@ export class SampleTooltipContents extends React.PureComponent {\n let hasStack = false;\n let formattedSampleTime = null;\n if (sampleIndex !== null) {\n- const { samples, stackTable } = rangeFilteredThread;\n+ const { samples } = rangeFilteredThread;\n const sampleTime = samples.time[sampleIndex];\n- const stackIndex = samples.stack[sampleIndex];\n- const hasSamples = samples.length > 0 && stackTable.length > 1;\n-\n- if (hasSamples) {\n- const stack = getFuncNamesAndOriginsForPath(\n- convertStackToCallNodeAndCategoryPath(\n- rangeFilteredThread,\n- ensureExists(stackIndex)\n- ),\n- rangeFilteredThread\n- );\n- hasStack = stack.length > 1 || stack[0].funcName !== '(root)';\n- }\n+\n+ hasStack = isSampleWithNonEmptyStack(sampleIndex, rangeFilteredThread);\n \n formattedSampleTime = getFormattedTimelineValue(\n sampleTime - zeroAt,\ndiff --git a/src/profile-logic/profile-data.js b/src/profile-logic/profile-data.js\nindex bbba49027a..4ae6f0a4d9 100644\n--- a/src/profile-logic/profile-data.js\n+++ b/src/profile-logic/profile-data.js\n@@ -71,7 +71,6 @@ import type {\n PageList,\n CallNodeTable,\n CallNodePath,\n- CallNodeAndCategoryPath,\n IndexIntoCallNodeTable,\n AccumulatedCounterSamples,\n SamplesLikeTable,\n@@ -2148,30 +2147,6 @@ export function processEventDelays(\n };\n }\n \n-/**\n- * This function converts a stack information into a call node and\n- * category path structure.\n- */\n-export function convertStackToCallNodeAndCategoryPath(\n- thread: Thread,\n- stack: IndexIntoStackTable\n-): CallNodeAndCategoryPath {\n- const { stackTable, frameTable } = thread;\n- const path = [];\n- for (\n- let stackIndex = stack;\n- stackIndex !== null;\n- stackIndex = stackTable.prefix[stackIndex]\n- ) {\n- const index = stackTable.frame[stackIndex];\n- path.push({\n- category: stackTable.category[stackIndex],\n- func: frameTable.func[index],\n- });\n- }\n- return path.reverse();\n-}\n-\n /**\n * Compute maximum depth of call stack for a given thread, and return maxDepth+1.\n * This value can be used as the length for any per-depth arrays.\n@@ -2883,34 +2858,32 @@ export function reserveFunctionsInThread(\n }\n \n /**\n- * From a valid call node path, this function returns a list of information\n- * about each function in this path: their names and their origins.\n+ * Returns whether the given sample has a stack which is non-null and not just\n+ * a single function with the name '(root)'.\n */\n-export function getFuncNamesAndOriginsForPath(\n- path: CallNodeAndCategoryPath,\n+export function isSampleWithNonEmptyStack(\n+ sampleIndex: IndexIntoSamplesTable,\n thread: Thread\n-): Array<{\n- funcName: string,\n- category: IndexIntoCategoryList,\n- isFrameLabel: boolean,\n- origin: string,\n-}> {\n- const { funcTable, stringTable, resourceTable } = thread;\n+): boolean {\n+ const { samples, stackTable, frameTable, funcTable, stringTable } = thread;\n \n- return path.map((frame) => {\n- const { category, func } = frame;\n- return {\n- funcName: stringTable.getString(funcTable.name[func]),\n- category: category,\n- isFrameLabel: funcTable.resource[func] === -1,\n- origin: getOriginAnnotationForFunc(\n- func,\n- funcTable,\n- resourceTable,\n- stringTable\n- ),\n- };\n- });\n+ const stackIndex = samples.stack[sampleIndex];\n+ if (stackIndex === null) {\n+ return false;\n+ }\n+\n+ if (stackTable.prefix[stackIndex] !== null) {\n+ // Stack contains at least two frames.\n+ return true;\n+ }\n+\n+ // Stack is only a single frame. Is it the '(root)' frame that Firefox puts\n+ // in its profiles?\n+ const frameIndex = stackTable.frame[stackIndex];\n+ const funcIndex = frameTable.func[frameIndex];\n+ const funcNameStringIndex = funcTable.name[funcIndex];\n+ const funcName = stringTable.getString(funcNameStringIndex);\n+ return funcName !== '(root)';\n }\n \n /**\ndiff --git a/src/profile-logic/transforms.js b/src/profile-logic/transforms.js\nindex a61e7f1ee4..70b77424f4 100644\n--- a/src/profile-logic/transforms.js\n+++ b/src/profile-logic/transforms.js\n@@ -12,6 +12,7 @@ import {\n updateThreadStacks,\n updateThreadStacksByGeneratingNewStackColumns,\n getMapStackUpdater,\n+ getOriginAnnotationForFunc,\n } from './profile-data';\n import { timeCode } from '../utils/time-code';\n import { assertExhaustiveCheck, convertToTransformType } from '../utils/flow';\n@@ -32,7 +33,6 @@ import type {\n IndexIntoStackTable,\n IndexIntoResourceTable,\n CallNodePath,\n- CallNodeAndCategoryPath,\n CallNodeTable,\n StackType,\n ImplementationFilter,\n@@ -1563,15 +1563,72 @@ export function filterCallNodePathByImplementation(\n );\n }\n \n-export function filterCallNodeAndCategoryPathByImplementation(\n- thread: Thread,\n+// User-facing properties about a stack frame.\n+export type BacktraceItem = {|\n+ // The function name of the stack frame.\n+ funcName: string,\n+ // The frame category of the stack frame.\n+ category: IndexIntoCategoryList,\n+ // Whether this frame is a label frame.\n+ isFrameLabel: boolean,\n+ // A string which is usually displayed after the function name, and which\n+ // describes, in some way, where this function or frame came from.\n+ // If known, this contains the file name of the function, and the line and\n+ // column number of the frame, i.e. the spot within the function that was\n+ // being executed.\n+ // If the source file name is not known, this might be the name of a native\n+ // library instead.\n+ // May also be empty.\n+ origin: string,\n+|};\n+\n+/**\n+ * Convert the stack into an array of \"backtrace items\" for each stack frame.\n+ * The returned array is ordered from callee-most to caller-most, i.e. the root\n+ * caller is at the end.\n+ */\n+export function getBacktraceItemsForStack(\n+ stack: IndexIntoStackTable,\n implementationFilter: ImplementationFilter,\n- path: CallNodeAndCategoryPath\n-): CallNodeAndCategoryPath {\n+ thread: Thread\n+): BacktraceItem[] {\n+ const { funcTable, stringTable, resourceTable } = thread;\n+\n+ const { stackTable, frameTable } = thread;\n+ const unfilteredPath = [];\n+ for (\n+ let stackIndex = stack;\n+ stackIndex !== null;\n+ stackIndex = stackTable.prefix[stackIndex]\n+ ) {\n+ const frameIndex = stackTable.frame[stackIndex];\n+ unfilteredPath.push({\n+ category: stackTable.category[stackIndex],\n+ funcIndex: frameTable.func[frameIndex],\n+ frameLine: frameTable.line[frameIndex],\n+ frameColumn: frameTable.column[frameIndex],\n+ });\n+ }\n+\n const funcMatchesImplementation = FUNC_MATCHES[implementationFilter];\n- return path.filter((funcIndex) =>\n- funcMatchesImplementation(thread, funcIndex.func)\n+ const path = unfilteredPath.filter(({ funcIndex }) =>\n+ funcMatchesImplementation(thread, funcIndex)\n );\n+ return path.map(({ category, funcIndex, frameLine, frameColumn }) => {\n+ return {\n+ funcName: stringTable.getString(funcTable.name[funcIndex]),\n+ category: category,\n+ isFrameLabel: funcTable.resource[funcIndex] === -1,\n+ origin: getOriginAnnotationForFunc(\n+ funcIndex,\n+ funcTable,\n+ resourceTable,\n+ stringTable,\n+ frameLine,\n+ frameColumn\n+ ),\n+ };\n+ });\n }\n \n /**\ndiff --git a/src/types/profile-derived.js b/src/types/profile-derived.js\nindex 5f9474a5dc..16875cb875 100644\n--- a/src/types/profile-derived.js\n+++ b/src/types/profile-derived.js\n@@ -431,13 +431,6 @@ export type AddressProof = {|\n */\n export type CallNodePath = IndexIntoFuncTable[];\n \n-export type CallNodeAndCategory = {|\n- func: IndexIntoFuncTable,\n- category: IndexIntoCategoryList,\n-|};\n-\n-export type CallNodeAndCategoryPath = CallNodeAndCategory[];\n-\n /**\n * This type contains the first derived `Marker[]` information, plus an IndexedArray\n * to get back to the RawMarkerTable.\n", "test_patch": "diff --git a/src/test/unit/profile-data.test.js b/src/test/unit/profile-data.test.js\nindex f4ce4ed64f..50f64a2a99 100644\n--- a/src/test/unit/profile-data.test.js\n+++ b/src/test/unit/profile-data.test.js\n@@ -16,7 +16,6 @@ import {\n getInvertedCallNodeInfo,\n filterThreadByImplementation,\n getSampleIndexClosestToStartTime,\n- convertStackToCallNodeAndCategoryPath,\n getSampleIndexToCallNodeIndex,\n getTreeOrderComparator,\n getSamplesSelectedStates,\n@@ -46,6 +45,7 @@ import {\n import {\n funcHasDirectRecursiveCall,\n funcHasRecursiveCall,\n+ getBacktraceItemsForStack,\n } from '../../profile-logic/transforms';\n \n import type { Thread, IndexIntoStackTable } from 'firefox-profiler/types';\n@@ -949,24 +949,6 @@ describe('funcHasDirectRecursiveCall and funcHasRecursiveCall', function () {\n });\n });\n \n-describe('convertStackToCallNodeAndCategoryPath', function () {\n- it('correctly returns a call node path for a stack', function () {\n- const profile = getCallNodeProfile();\n- const { derivedThreads } = getProfileWithDicts(profile);\n- const [thread] = derivedThreads;\n- const stack1 = thread.samples.stack[0];\n- const stack2 = thread.samples.stack[1];\n- if (stack1 === null || stack2 === null) {\n- // Makes flow happy\n- throw new Error(\"stack shouldn't be null\");\n- }\n- let callNodePath = convertStackToCallNodeAndCategoryPath(thread, stack1);\n- expect(callNodePath.map((f) => f.func)).toEqual([0, 1, 2, 3, 4]);\n- callNodePath = convertStackToCallNodeAndCategoryPath(thread, stack2);\n- expect(callNodePath.map((f) => f.func)).toEqual([0, 1, 2, 3, 5]);\n- });\n-});\n-\n describe('getSamplesSelectedStates', function () {\n function setup(textSamples) {\n const {\n@@ -1566,3 +1548,43 @@ describe('getNativeSymbolInfo', function () {\n });\n });\n });\n+\n+describe('getBacktraceItemsForStack', function () {\n+ function getBacktraceString(thread, sampleIndex): string {\n+ return getBacktraceItemsForStack(\n+ ensureExists(thread.samples.stack[sampleIndex]),\n+ 'combined',\n+ thread\n+ )\n+ .map(({ funcName, origin }) => `${funcName} ${origin}`)\n+ .join('\\n');\n+ }\n+\n+ it('returns backtrace items in the right order and with frame line numbers', function () {\n+ const { derivedThreads } = getProfileFromTextSamples(`\n+ A[file:one.js][line:20] A[file:one.js][line:21] A[file:one.js][line:20]\n+ B[file:one.js][line:30] D[file:one.js][line:50] B[file:one.js][line:31]\n+ C[file:two.js][line:10] C[file:two.js][line:11] C[file:two.js][line:12]\n+ D[file:one.js][line:51]\n+ `);\n+\n+ const [thread] = derivedThreads;\n+\n+ expect(getBacktraceString(thread, 0)).toMatchInlineSnapshot(`\n+ \"C two.js:10\n+ B one.js:30\n+ A one.js:20\"\n+ `);\n+ expect(getBacktraceString(thread, 1)).toMatchInlineSnapshot(`\n+ \"C two.js:11\n+ D one.js:50\n+ A one.js:21\"\n+ `);\n+ expect(getBacktraceString(thread, 2)).toMatchInlineSnapshot(`\n+ \"D one.js:51\n+ C two.js:12\n+ B one.js:31\n+ A one.js:20\"\n+ `);\n+ });\n+});\n", "fail_to_pass": ["getBacktraceItemsForStack returns backtrace items in the right order and with frame line numbers"], "pass_to_pass": ["console-accessible values on the window object totalMarkerDuration handles mixed valid and invalid markers", "actions/ProfileView changeSelectedMarker changes the selected marker", "stack chart transform shortcuts with both a selected and a right clicked node handles collapse function subtree", "canonicalizeRangeSet removes empty ranges", "calltree/ZipFileTree clicking on a profile link will show the ProfileViewer component when done processing", "visualMetrics processing adds markers to the tab process", "getTimingsForSidebar in a non-inverted tree for profiles with JS nodes returns good timings for a root node", "bisectionRightByKey returns index of the first element whose key is greater than x", "remove-template-information should not remove information we want to keep", "getTimingsForSidebar for an inverted tree returns good timings for a root node", "ordering and hiding global tracks selects the mainThreadIndex when isolating a process track", "selectors/getFlameGraphTiming contains totalTime, selfTime and selfRelative", "url handling tracks local tracks can select a local track without mixing track and thread indexes", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in B", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"focus-subtree\"", "\"merge-call-node\" transform on a call tree call node [A, B, C] can be merged into [A, B]", "timeline/TrackContextMenu when a global track is right clicked isolates a process track without a main thread", "profile upload can abort the request", "CombinedChart renders combined stack chart", "actions/ProfileView getRangeFilteredScreenshotsById can extract some screenshot markers", "EmptyThreadIndicator startup empty thread indicator is 30% on screen when zoomed all the way out", "CallTreeSidebar matches the snapshots when displaying data about the currently selected node", "UrlManager can handle a from-post-message data source", "filter-by-implementation will return the same thread if filtering to \"all\"", "actions/ProfileView changeMarkersSearchString changes the search string", "actions/receive-profile retrieveProfileFromFile will load and view a simple profile with no errors", "jwt/extractAndDecodePayload returns null when the payload isn't a JSON", "app/ServiceWorkerManager does not register a service worker in the development environment", "actions/receive-profile retrieveProfilesToCompare keeps the initial rootRange as default", "findRoundBytesValueGreaterOrEqualTo rounds large bytes values using base 2 round value", "ProfileCallTreeView with balanced native allocations matches the snapshot for retained allocations", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getFriendlyThreadName", "TooltipMarker renders properly network markers where content type is missing", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getJankMarkersForHeader", "TrackPower does not break when the selection is empty", "get-sample-index-closest-to-time returns the correct sample index for a provided time", "actions/ProfileView changeImplementationFilter changes the implementation filter", "calltree/CallNodeContextMenu basic rendering does not render the context menu when it is closed", "selectors/getJsTracerTiming full stack-based view has no JS tracer timing if no js tracer info is present", "deriveMarkersFromRawMarkerTable creates a marker even if there is no start or end time", "StackChart matches the snapshot for an inverted draw call", "timeline/TrackScreenshots shows a hover when moving the mouse", "mergeProfilesForDiffing function should set interval of merged profile to minimum of all intervals", "SampleTooltipContents renders the sample with \u00b5s CPU usage information properly", "UrlManager sets the data source to from-browser when coming from the legacy URL /from-addon", "symbolication AddressLocator should return the first library for addresses inside the first library", "TrackProcessCPU has a tooltip that matches the snapshot", "actions/receive-profile viewProfile with threadCPUDelta won't hide any tracks in a profile resulting from a compare operation", "ProfileCallTreeView with JS Allocations matches the snapshot for JS allocations", "NetworkChartRowBar phase calculations divides the phases when only the start marker is present", "WindowTitle shows the correct title for uploaded recordings", "right clicked call node info sets right clicked call node info when right clicked call node action is dispatched", "timeline/TrackContextMenu hide all matching tracks hides process tracks without a main thread", "Derive markers from Gecko phase markers creates an instant marker", "timeline/TrackContextMenu hide all matching tracks does not hide if the process without a main thread has only one visible track left", "sanitizePII when sanitizing private browsing data removes samples coming from private browsing windows", "Viewport mousewheel zooming using ctrl + mousewheel with a right margin zooms the preview selection equally when the mouse is centered", "marker schema labels is empty if there is no information in a payload", "actions/ProfileView changeNetworkSearchString filters the network markers", "arePathsEqual returns false for unequal paths", "\"focus-category\" transform on a tinier call tree category Graphics can be focused", "event handlers for Firefox WebChannel events will error if the messages are received that are malformed", "reducer zipFileState computes the zip file max depth", "actions/receive-profile retrieveProfileFromFile will be an error to view a profile with no threads", "flame graph transform shortcuts with a right clicked node handles merge function", "formatBytes can return values with byte precision", "profile-metainfo formatPlatform can format Android information", "strip-function-arguments should strip the function arguments", "symbolication AddressLocator should return the third library for addresses inside the third library", "SymbolStore should call requestSymbolsFromServer first", "sanitizePII should sanitize the favicons in the pages information", "\"filter-samples\" transform on a call tree filters to multiple ranges of \"UserTiming\"", "diffing trees finds the heaviest call path even when it has ancestors with low totals", "actions/receive-profile _fetchProfile fails if a bad zip file is passed in", "actions/receive-profile _fetchProfile fails if a bad profile JSON is passed in, with no content type", "BottomBox does not show the source view at loadtime", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in F", "bisectionRight returns index of the first number greater than x", "getCheckedSharingOptions toggleCheckedSharingOptions can toggle options", "Timeline multiple thread selection forgets a global clicked track whose process is hidden later", "ordering and hiding global tracks can hide a global track", "jwt/isValidJwtToken returns true for valid jwt tokens", "FlameGraph ignores invertCallstack and always displays non-inverted", "app/TabSelectorMenu should not render when the profile does not contain any page data", "NetworkChartRowBar URL split splits properly a url without a directory", "app/DetailsContainer renders an initial view without a sidebar for tab stack-chart", "profile upgrading and markers upgrades cause timestamps from the processed version 33", "counter selectors can accumulate samples", "fetchAssembly sets the continueUntilFunctionEnd flag in the request JSON if the function size is not known", "app/DetailsContainer renders an initial view with a sidebar for tab flame-graph", "filterRawMarkerTableToRange keeps a screenshot markers happening before the range if there is no other marker", "url handling tracks global tracks creates tracks without any set search parameters", "TrackProcessCPU accounts the real sample times correctly", "filterRawMarkerTableToRangeWithMarkersToDelete filters generic markers without markerToDelete", "timeline/LocalTrack with a thread track matches the snapshot of a local track", "BottomBox should show the assembly view when pressing the toggle button", "selectors/getUserTimingMarkerTiming simple profile", "Timeline multiple thread selection unselects a selected local track whose global process is hidden", "\"collapse-recursion\" transform advanced can apply the transform to the selected CallNodePaths", "flame graph transform shortcuts with a selected node handles collapse recursion", "Derive markers from Gecko phase markers handles nested interval start/end markers", "actions/receive-profile retrieveProfileOrZipFromUrl can retrieve a gzipped profile from the web and save it to state", "committed ranges parsing deserializes when there is a small range", "CallTree transform shortcuts with both a selected and a right clicked node handles focus-function", "shared/FilterNavigatorBar pops the item unless the last one is clicked", "selectors/getFlameGraphTiming sorts stacks in alphabetical order", "TrackEventDelay can create a tooltip", "converting Google Chrome profile successfully imports a profile with the chrome array format", "marker schema formatting can apply a variety of formats", "ThreadActivityGraph selects the full call node path when clicked", "Timeline TimelineInitialSettings selects the set threads if setting is present", "WindowTitle shows profile name in the window title if it is available", "flame graph transform shortcuts with a right clicked node ignores shortcuts with modifiers", "TooltipMarker renders properly network markers with a preconnect part", "WindowTitle shows the profiler startTime in the window title if it is available", "converting Linux perf profile should import a simple perf profile", "timeline/GlobalTrack will render markers with a timeline-overview schema", "NetworkChartRowBar MIME-type filter searches for html MIME-Type", "app actions isSidebarOpen can change the state of the sidebar", "EmptyThreadIndicator shutdown empty thread indicator is not shown when the viewport isn\u2019t in range", "actions/receive-profile retrieveProfilesToCompare does not reuse the implementation information if one profile used it", "EmptyThreadIndicator empty buffer start indicator is on screen when zoomed all the way out", "profile upload uploads with the right information", "selectors/getMarkerChartTimingAndBuckets markers of the same name puts markers of overlapping times in two rows", "\"merge-call-node\" transform on a JS call tree can merge the node at JS path \"onLoad\" -> \"A\"", "flame graph transform shortcuts with a right clicked node handles collapse function subtree", "NetworkChartRowBar phase calculations displays properly a network marker even when it crosses the boundary", "CallTree transform shortcuts with a selected node handles merge function", "StackChart only computes the chart after the first tick", "canonicalizeRangeSet sorts unsorted ranges", "selectors/getMarkerChartTimingAndBuckets markers that are crossing the profile start or end renders properly markers starting before profile start", "sanitizePII should remove threads ending before the range if range is filtered", "url upgrading version 6: change encoding of fields with TrackIndex lists parses version 5 correctly", "\"collapse-function-subtree\" transform can apply the transform to the expanded CallNodePaths", "sanitizePII when sanitizing private browsing data removes threads that are for private browsing exclusively, when using Fission", "timeline/LocalTrack with a thread track can right click a thread", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in I", "Timeline multiple thread selection will not de-select the last thread", "counter selectors can get the counter description", "app/DetailsContainer renders an initial view with a sidebar for tab calltree", "strip-function-arguments should do nothing if not a function call", "EmptyThreadIndicator empty buffer start indicator is 100% on screen zoomed far into emptyBufferStart time", "ordering and hiding global tracks can show a global track", "app/MenuButtons matches the snapshot for the closed state", "selectors/getFlameGraphTiming can handle null samples", "findRoundBytesValueGreaterOrEqualTo rounds small bytes values using base 10 round value", "flame graph transform shortcuts with a right clicked node handles drop function", "timeline/TrackContextMenu track search can filter a global track with its local track", "jwt/extractProfileTokenFromJwt errors when the token doesn't have the needed property", "timeline/TrackScreenshots makes sure the hover image does not go off the left side of screen", "filterRawMarkerTableToRange filters interval start/end markers", "ordering and hiding global tracks sorting of track types to ensure proper URL backwards compatibility creates a separate user-facing ordering that is different from the internal sorting", "calltree/ProfileCallTreeView renders call tree with some search strings", "origin annotation formats library origins correctly", "timeline/LocalTrack with a thread track starts out not being selected", "timeline/TrackContextMenu show all matching tracks shows local track's global track even if it wasn't visible before", "app/CompareHome matches the snapshot", "shared/ButtonWithPanel opens the panel when the button is clicked and closes the panel by clicking the button again", "MarkerChart EmptyReasons shows a reason when a profile has no markers", "bisectionRightByKey throws TypeError if either low or high are outside the range of the array", "getLineTimings for getStackLineInfoForCallNode passes a test where the same function is called via different call paths", "\"focus-category\" transform on a longer larger call tree category Graphics can be focused", "actions/receive-profile viewProfile will hide an empty global track when all child tracks are hidden", "app actions changeSelectedTab can change tabs", "url upgrading version 4: Add relevantForJs frames to JS callNodePaths can upgrade the callNodePath in the second branch of the call tree", "jwt/extractAndDecodePayload returns null when the payload isn't a valid token", "app/AppViewRouter renders a compare home when navigating to /compare/, then loads when changing profiles", "StackSettings can change the implementation filter to Native", "process-profile processGeckoProfile should create no entries in nativeSymbols before symbolication", "WindowTitle shows the file name when viewing a file from a zip file", "\"filter-samples\" transform on a call tree filters to range of \"Log\"", "getJankMarkersForHeader will skip null responsiveness values after a breaking point", "ListOfPublishedProfiles still displays the link to all recordings when there is only 1 profile", "TooltipMarker renders page information for HTTP/2.0 pages in network markers", "url upgrading won't run if the current version is specified", "getAddressTimings for getStackAddressInfoForCallNode passes a test with an inverted thread", "Native allocation call trees with balanced allocations can create a call tree from retained allocations", "TimelineMarkers does not render several dot markers in the same position", "selectors/getThreadRange ignores markers when there are samples", "sanitizePII should not sanitize counters if shouldRemoveCounters is not provided", "profileName provides default values for when no profile name is given", "actions/receive-profile retrieveProfileFromFile will give an error when unable to parse gzipped profiles", "SampleTooltipContents renders the sample tooltip properly", "symbolServerUrl will strip the trailing slash on an allowed https host", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in C", "MarkerChart with search strings renders lots of markers initially", "sanitizePII should not push any null values to marker values by mistake while filtering", "actions/receive-profile retrieveProfileFromBrowser can retrieve a profile from the browser as arraybuffer using frame-script", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"collapse-recursion\"", "formatBytes can return values with kilobyte precision", "shortenUrl calls the bitly API properly and returns the value", "NetworkChartRowBar MIME-type filter searches for css MIME-Type", "MarkerChart with search strings renders only the marker that was searched for", "TimelineMarkers renders correctly memory markers", "committed ranges parsing is permissive with invalid input", "actions/changeShowJsTracerSummary can change the view to show a summary", "\"filter-samples\" transform on a call tree does not filter to range of \"DOMEvent\" by looking at its unsearchable fields", "utils/string removeFilePath should not remove non paths", "TrackMemory draws a dot that matches the snapshot", "EmptyThreadIndicator rendering matches the snapshot when rendering no indicators", "utils/string removeURLs should remove the basic URLs successfully", "actions/receive-profile retrieveProfileForRawUrl retrieves profile from a `compare` data source and loads it", "Network Chart/tooltip behavior shows a tooltip when the mouse hovers the line", "AppLocalizationProvider fetches FTL strings for all available locales, but not others", "sanitizePII should sanitize the screenshots if they are provided", "selectors/getMarkerChartTimingAndBuckets network markers puts network markers at the end of the Network category", "actions/receive-profile retrieveProfilesToCompare expands the URL if needed", "JS allocation call trees can invert the allocation tree", "committed ranges serialization serializes when there is no range", "timeline/LocalTrack with a memory track correctly renders the network label", "shared/Tooltip is rendered appropriately", "actions/ProfileView addTransformToStack can add a transform to the stack", "StackChart can scroll into view when selecting a node", "calltree/ZipFileTree preserves extensions other than .json", "\"focus-category\" transform on a tiny call tree category Graphics can be focused", "flame graph transform shortcuts with both a selected and a right clicked node handles collapse resource", "sanitizePII should remove threads starting after the range if range is filtered", "filter-by-implementation will return only C++ samples if filtering to \"cpp\"", "MarkerSidebar matches the snapshots when displaying data about the currently selected node", "selectors/getThreadRange should use the Instant marker start time even if it is zero", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getViewOptions", "getJankMarkersForHeader will create a jank instance with responsiveness values", "ProfileViewSelectors.getProcessesWithMemoryTrack knows when a profile does not have a memory track", "bisectionLeft returns index of first occurence of x, if x exists in the array", "ordering and hiding local tracks can hide a local track", "actions/receive-profile retrieveProfileOrZipFromUrl can retrieve a profile from the web and save it to state", "ThreadActivityGraph with intersection observer will draw after the intersection observer if it is intersecting", "fetchSource fetches archives", "call node paths on implementation filter change starts with js CallNodePaths", "actions/ProfileView expandAllCallNodeDescendants expands whole tree from root", "CallTree transform shortcuts with a right clicked node handles collapse resource", "getDownloadRecipeForSourceFile finds the correct URLs for git paths", "timeline/TrackContextMenu show all matching tracks shows a single track", "MarkerTable IPC marker context menu item can switch to a hidden global track", "sanitizePII should keep empty threads that were already empty", "selectors/getHasPreviewFilteredCtssSamples returns true if there are samples", "shared/Tooltip positioning is rendered at the left and top of the window if the space is missing elsewhere", "actions/ProfileView changeMarkersSearchString filters the markers by a potential data payload of type IPC", "TooltipCallNode with page information displays Page URL for non-iframe pages", "app/DragAndDrop matches the snapshot with default overlay", "Viewport scrolling hint will not show a shift scrolling hint after zooming once", "search strings properly handles the call tree search string stacks with several items", "right clicked marker info sets right clicked marker info when right clicked marker action is dispatched", "sanitizePII should sanitize the pages information", "MarkerChart context menus displays and still highlights other markers when hovering them", "jsTracerFixed does not modify a valid structure", "transform retained native allocations can render a normal call tree", "console-accessible values on the window object totalMarkerDuration calculates duration for interval markers", "bisectionRightByStrKey returns index of the first element whose key is greater than x", "formatBytes can return values with the gigabyte unit", "SampleGraph matches the 2d canvas draw snapshot", "Viewport renders the wrapped chart component", "funcHasDirectRecursiveCall and funcHasRecursiveCall correctly identifies directly recursive functions based on the filtered call node table, which takes into account implementation", "shared/BlobUrlLink injects a blob url into a link", "calltree/CallNodeContextMenu clicking on the rest of the menu items can copy a function name", "Native allocation call trees will apply a preview selection", "actions/receive-profile retrieveProfileFromFile symbolicates unsymbolicated profiles", "TooltipMarker shows a tooltip for Jank markers", "attemptToPublish cycles through the upload phases on a successful upload", "actions/receive-profile viewProfile with threadCPUDelta will show the only thread regardless of CPU activity", "Timeline TimelineInitialSettings disables thread ordering if setting is present", "deriveMarkersFromRawMarkerTable should create a marker for the MinorGC startTime/endTime marker", "upgrading processed profiles should upgrade processed-1.json all the way to the current version", "snapshots of selectors/profile matches the last stored run of selectedNodeSelectors.getName", "committed ranges serialization serializes when there is 1 range", "actions/receive-profile retrieveProfileFromStore requests several times in case of 403", "TrackEventDelay has a tooltip that matches the snapshot", "utils/string removeURLs should remove the URLs with texts around it successfully", "app/ServiceWorkerManager with the `public` datasource doesn't show a notice until we're done symbolicating", "getFriendlyThreadName uses the eTLD+1 field if provided", "StackChart matches the snapshot for the loading screen", "filterRawMarkerTableToRange filters instant markers", "getTimingsForSidebar for an inverted tree for profiles with JS nodes returns good timings for a JS node with various implementations", "Viewport scrolling up and down cannot scroll past the top of the viewport", "timeline/TrackContextMenu the \"show all tracks\" menu item selects all tracks", "app/MenuButtons deleting a profile displays the delete button if we have the uploaded data but no JWT token", "snapshots of selectors/profile matches the last stored run of getProfileInterval", "CallTree transform shortcuts with a right clicked node handles collapse recursion", "jsTracerFixed fixes events which are too early", "unfiltered call tree computed structure computes an unfiltered call tree", "getNativeSymbolsForCallNode finds a single symbol", "app/MenuButtons matches the snapshot for a compression error", "timeline/TrackScreenshots moves the hover when moving the mouse", "formatKiloBytes can return values with kilobyte precision", "app/NonLocalizedErrorBoundary reports errors to the analytics", "marker schema labels can parse labels with unique strings", "shared/Tooltip positioning is rendered at the left and top of the cursor if the space is missing at the right and below", "stack chart transform shortcuts with a selected node handles merge call node", "profile meta processing keeps the profilingStartTime and profilingEndTime", "actions/ProfileView changeInvertCallstack changes the callstack inversion", "calltree/CallNodeContextMenu basic rendering renders a full context menu when open, with many nav items", "NetworkChartRowBar MIME-type filter searches for js MIME-Type", "ordering and hiding local tracks will not hide the last visible thread", "profile upload returns a proper error when receiving another non-2xx status", "TrackCustomMarker draws a dot that matches the snapshot", "flame graph transform shortcuts with a selected node handles collapse function subtree", "sanitizePII should not sanitize counters if its thread is not deleted", "makeOptionsFromArgv should throw if argument has no specified value", "actions/receive-profile retrieveProfilesToCompare reuses the implementation information if both profiles used it", "Network Chart/tooltip behavior does not show tooltips when a context menu is displayed", "JS allocation call trees will apply a committed range selection", "ThreadActivityGraph matches the component snapshot", "actions/receive-profile retrieveProfilesToCompare doesn't include screenshot track if the profiles don't have any screenshot marker", "getProcessedEventDelays can process the event delay values with two combined peaks and returns meaningful numbers", "mergeThreads function merges markers with stacks properly", "event handlers for Firefox WebChannel events handles legacy STATUS_QUERY responses correctly", "Date mock supports intanceof Date", "url handling tracks local tracks can reorder local tracks", "calltree/ProfileCallTreeView highlights the row properly when rightclicking a selected row", "\"collapse-resource\" transform specific implementation can collapse the \"firefox\" library as well as the C.js intermediate function", "TrackCustomMarker with intersection observer will not draw before the intersection observer", "timeline/TrackContextMenu track search can filter a single global track", "TrackVisualProgress matches the component snapshot", "ProfileViewer calculates the full timeline height correctly", "MarkerTable can copy a marker's cause using the context menu", "thread merging respects the ThreadViewOptions by using a ThreadsKey, with selected call nodes", "category-info should return no special category if there are no methods", "Timeline TimelineInitialSettings displays the initially visible threads if setting is present", "NetworkChart renders NetworkChart correctly", "SymbolStore should persist in DB", "\"collapse-recursion\" transform unbelievably advanced can collapse the B function", "CallTree transform shortcuts with a selected node handles collapse resource", "diffing trees displays a proper call tree, even for range-filtered threads", "actions/receive-profile viewProfile with threadCPUDelta will hide a thread when the relative CPU percentage is below 5% even if it has more samples with > 90% CPU delta", "origin annotation formats extension origins correctly", "actions/ProfileView changeMarkersSearchString filters the markers by a potential data payload of type FileIO", "app/Details renders an initial view with the right panel for tab marker-chart", "actions/receive-profile viewProfile too many threads will keep certain threads visible even if they have low CPU usage", "calltree/ProfileCallTreeView navigation keys selects row on left click", "doSymbolicateProfile doSymbolicateProfile can symbolicate a profile when symbols come from-server", "TooltipCallNode handles native allocations", "timeline/TrackContextMenu when a global track is right clicked matches the snapshot of a global non-process track", "marker schema labels parseErrors errors when accessing twice into a payload", "doSymbolicateProfile merging of functions with different memory addresses, but in the same function symbolicates and merges functions in the stored call node paths", "TrackCustomMarker can create a tooltip", "profile state invalidation when switching between profiles invalidates profile view state", "computeThreadCPURatio processes Linux timing values and caps them to 100% if they are more than the interval values", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getFilteredThread", "Timeline multiple thread selection will select a thread through enter and spacebar keypresses for global tracks", "TooltipMarker shows the source thread for markers from a merged thread", "TrackPower matches the component snapshot", "deriveMarkersFromRawMarkerTable should create a marker for the DOMEvent marker", "StackChart matches the snapshot for the chart", "profile-metainfo formatPlatform can format MacOS information", "Viewport dragging around will not drag beyond the top of the window", "deriveMarkersFromRawMarkerTable should handle nested markers correctly", "symbolication symbolicateProfile should assign correct symbols to frames", "timeline/GlobalTrack displays the container status of a fission thread", "getFriendlyThreadName adds indexes to the tracks with homonym eTLD+1 fields", "timeline/TrackContextMenu hide all matching tracks hides a local track", "profile state invalidation when switching between profiles invalidates profile-specific url state", "actions/icons With the initial state getIconsWithClassNames returns an empty map", "jwt/isValidJwtToken returns false for incomplete tokens", "snapshots of selectors/profile matches the last stored run of markerThreadSelectors.getSearchFilteredMarkerIndexes", "url handling tracks global tracks can hide tracks", "converting dhat profiles should import a dhat profile", "\"focus-subtree\" transform on an inverted call tree can be un-inverted and keep the transform", "timeline/TrackContextMenu show all matching tracks shows children of a global track", "actions/receive-profile retrieveProfileFromFile will give an error when unable to parse json", "TrackPower shows a tooltip with a Power: line and a power unit", "Viewport mousewheel zooming using ctrl + mousewheel with a right margin does not scroll the viewport right when the mouse is centered on the right.", "calltree/ProfileCallTreeView EmptyReasons shows a reason for a call tree with no samples", "MarkerChart can turn on the show user timings", "stack chart transform shortcuts with a right clicked node handles focus subtree", "Viewport keyboard navigation moves viewport left and right", "string-table should return the correct index for existing strings", "extractProfileFilterPageData extracts the page data of the last frame when there are multiple relevant pages", "committed ranges serializing and parsing will round values near the threshold", "StackChart EmptyReasons shows reasons when samples are out of range", "UrlManager sets the data source to from-browser", "app actions panelLayoutGeneration will be updated when working with the timeline", "TrackMemory has a tooltip that matches the snapshot for counts equalling zero", "doSymbolicateProfile merging of functions with different memory addresses, but in the same function starts with expanded call nodes of multiple memory addresses", "app/Details renders an initial view with the right panel for tab flame-graph", "TrackBandwidth draws a dot that matches the snapshot", "unfiltered call tree CallTree methods icons from the call tree upgrades http to https", "hashPath returns the same value for different objects with the same content", "category-info should return the majority category, 1 mozilla vs 2 arttracetest", "timeline/TrackThread can click a marker", "process-profile processGeckoProfile should have three threads", "snapshots of selectors/profile matches the last stored run of selectedNodeSelectors.getIsJS", "\"collapse-recursion\" transform advanced can collapse the B function", "calltree/ZipFileTree removes .json extensions", "profile-metainfo formatPlatform can format Linux information", "timeline/LocalTrack with an IPC track can be shown", "WindowTitle shows the profiler startTime with public annotation in the window title if it is available", "timeline/GlobalTrack matches the snapshot of a global process track without a thread", "getCheckedSharingOptions default filtering by channel does not filter with nightly", "urlFromState outputs no default parameters besides the current URL version", "getDownloadRecipeForSourceFile finds the correct URLs for cargo paths", "CallTree transform shortcuts with a right clicked node handles focus-category", "StackSettings matches the snapshot", "jwt/isValidJwtToken returns false for invalid base64url value: SOE=.SUY5.4ScA", "actions/receive-profile viewProfile too many threads will limit the visible threads to 15", "\"merge-call-node\" transform on a JS call tree has an untransformed JS only view", "console-accessible values on the window object can extract gecko logs", "visual metrics selectors can get perceptual visual progress", "ProfileName shows UnitledProfile when profile has no name", "TrackPower can draw a dot on both extremes of the graph", "actions/ProfileView selectTrack with a thread tracks can switch to another global track", "Viewport mousewheel zooming using ctrl + mousewheel no margins does not scroll the viewport right when the mouse is centered on the right.", "actions/ProfileView getRangeFilteredScreenshotsById filters screenshots within a range selection", "TooltipMarker renders properly network markers with a preconnect part containing only the domain lookup", "sanitizePII should sanitize both URLs and extension ids inside Extension Suspend markers", "sanitizePII should sanitize all the URLs inside network markers", "URL persistence of bottom box (source view and assembly view) persists the native symbol shown in the assembly view to the URL", "shared/ButtonWithPanel opens the panel when the button is clicked and closes the panel when the escape key is pressed", "TrackProcessCPU matches the 2d canvas draw snapshot", "mergeProfilesForDiffing function should set the resulting profile to symbolicated if all are symbolicated", "makeOptionsFromArgv should pass arguments into options object", "canonicalizeRangeSet absorbs nested ranges", "timeline/TrackContextMenu track search shows a message when search filter does not match any track", "call node paths on implementation filter change re-adds the C++ functions when going from JS to combined", "actions/ProfileView changeMarkersSearchString filters the markers by specified fields", "url upgrading version 2: split apart timeline tab switches to the stack chart when given a timeline tab", "calltree/ProfileCallTreeView selects a node when left clicking", "app/DetailsContainer renders an initial view with a sidebar", "timeline/GlobalTrack starts out not being selected", "ordering and hiding global tracks default selected thread selection by activity selects highest activity tab even when parent has higher activity", "reducer zipFileState profileName handling computes a profile when no folder present", "app/DetailsContainer renders an initial view with a sidebar for tab marker-table", "timeline/TrackScreenshots sets a preview selection when clicking with the mouse", "ordering and hiding local tracks properly initializes the sorting with for the IPC tracks", "TrackProcessCPU draws a dot that matches the snapshot", "\"collapse-recursion\" transform basic can collapse the B function", "stack chart transform shortcuts with both a selected and a right clicked node handles merge call node", "gecko counters processing can extract the counter information correctly", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getFlameGraphTiming", "process-profile extensions metadata should be handled correctly if missing", "profile deletion can delete a profile", "doSymbolicateProfile doSymbolicateProfile can symbolicate a profile when symbols come from-browser", "last requested call tree summary strategy defaults to timing", "timeline/TrackNetwork displays a context menu when right clicking", "unfiltered call tree computes correct numbers when using large weights", "Viewport mousewheel zooming using ctrl + mousewheel with a left margin zooms the preview selection in a direction when the mouse is to the left", "deriveMarkersFromRawMarkerTable shifts content process marker times correctly, especially in network markers", "UrlManager prevents navigating back after publishing", "category-info should return the right special category", "getCheckedSharingOptions default filtering by channel does filter with beta", "url upgrading version 6: change encoding of fields with TrackIndex lists parses version 5 with multiple selected threads (comma-separated)", "filterRawMarkerTableToRange filters screenshot markers", "MarkerChart sets a correct size for the marker chart even when dPR is non-integer", "TooltipMarker renders page information for HTTP/1.0 pages in network markers", "app/MenuButtons matches the snapshot for the opened panel for a release profile", "profile meta processing keeps the sampleUnits object successfully", "converting Linux perf profile should import a perf profile", "InMemorySymbolDB should throw when getting a SymbolTable that was not set", "SampleTooltipContents renders the CPU usage properly for the first part of the sample", "\"collapse-recursion\" transform advanced keeps the line number and address of the innermost frame", "URL persistence of transform stacks for a combined thread (multi-thread selection) persists the transform for thread 2 if thread 2 is selected", "Viewport scrolling hint will not show a ctrl scrolling hint after zooming once", "stack chart transform shortcuts with a right clicked node handles collapse function subtree", "string-table should return a new index for a new string", "ThreadActivityGraph matches the 2d canvas draw snapshot", "inverted call tree computed structure computes a non-inverted call tree", "getInvertedCallNodeInfo creates a correct suffix order for a different example profile", "parseFileNameFromSymbolication parses cargo paths", "unfiltered call tree CallTree methods getParent() finds a callNode's parent", "url upgrading version 7: change default timeline type removes the explicit cpu-category from the url", "InMemorySymbolDB should get a SymbolTable that was set", "calltree/CallNodeContextMenu clicking on the rest of the menu items can show source file", "formatBytes can return values with the megabyte unit", "app/MenuButtons deleting a profile does not display the delete button if the profile is public but without uploaded data", "timeline/TrackNetwork changes the hovered marker information in the redux store", "UploadedRecordingsHome matches a snapshot when there is no published profiles", "timeline/LocalTrack with an IPC track appears hidden by default", "Viewport reacts to changes to the panel layout generation", "fetchAssembly does not query non-local symbol servers", "Root with history resets the history length between tests", "Viewport mousewheel zooming using ctrl + mousewheel with both margins cannot zoom out beyond the bounds", "actions/receive-profile retrieveProfileFromBrowser can retrieve a profile from the browser as json using frame-script", "MarkerChart EmptyReasons shows a reason when a profile's markers have been filtered out", "timeline/TrackThread does not add off-thread file io markers even if they are present", "diffing trees computes a rootTotalSummary that is the absolute count of all intervals", "bisectionRight throws TypeError if either low or high are outside the range of the array", "\"filter-samples\" transform on a call tree filters to range of \"DOMEvent\"", "actions/receive-profile retrieveProfileForRawUrl finishes symbolication for `from-browser` data source", "profile-metainfo formatPlatform can format Windows information", "PathSet implements .delete", "attemptToPublish can revert back to the original state", "actions/ProfileView selectTrack with allocation-based tracks will switch to a \"timing\" summary strategy when clicking from a js allocation, to a timings-only thread", "app/AppViewRouter renders the addon loading page, and the profile view after capturing", "actions/ProfileView changeMarkersSearchString filters the markers by searchable unique-string fields", "app/ServiceWorkerManager with the `from-url` datasource shows a notice when the SW is updated", "gecko counters processing offsets the counter timing for child processes", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getTransformLabelL10nIds", "utils/string removeURLs should not remove non URLs", "actions/receive-profile retrieveProfileFromFile can load json with a good mime type", "stack chart transform shortcuts with a selected node ignores shortcuts with modifiers", "stack chart transform shortcuts with a right clicked node handles focus-category", "app/CurrentProfileUploadedInformationLoader populates the state if a known hash is loaded, resets it otherwise", "selectors/getFlameGraphTiming computes a basic example", "UrlManager sets the data source to public and doesn't change the URL when there's a fetch error", "\"focus-subtree\" transform on a call tree can remove the transform", "right clicked call node info resets right clicked call node when context menu is hidden", "VerticalIndicators displays tooltips", "search strings defaults to not showing user timings", "StackChart EmptyReasons shows reasons when a profile has no samples", "CallTree transform shortcuts with both a selected and a right clicked node handles collapse recursion", "app/Home will switch to recording instructions when enabling the popup", "URL persistence of transform stacks for a combined thread (multi-thread selection) persists the transform for thread 1 if thread 1 is selected", "mergeThreads function merges schema markers with unique-string fields properly", "TrackMemory with intersection observer will not draw before the intersection observer", "actions/icons With the initial state getIconClassName returns an empty string for any icon", "actions/ProfileView selectTrack with a network track starts out with the thread track and marker chart selected", "mouseTimePosition should get mouse time position", "SampleGraph with intersection observer will not draw after the intersection observer if it is not intersecting", "getNativeSymbolInfo calculates the correct native symbol info", "\"focus-category\" transform on a small call tree category Graphics can be focused", "actions/receive-profile retrieveProfileFromBrowser tries to symbolicate the received profile, frame script version", "timeline/TrackScreenshots is not created in the with a profile with no screenshots", "TooltipMarker renders page information for HTTP/1.1 pages in network markers", "strip-function-arguments should do nothing if not ending with parentheses", "getTimingsForSidebar in a non-inverted tree returns good timings for a leaf node, also present in other stacks", "actions/ProfileView selectTrack with a thread tracks starts out with the tab thread selected", "app/TabSelectorMenu should render properly", "Native allocation call trees with unbalanced allocations cannot create a call tree from retained allocations", "url handling tracks global tracks will not accept invalid hidden threads", "calltree/CallNodeContextMenu clicking on the rest of the menu items can copy a script URL", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in A", "selectors/getStackTimingByDepth uses search strings", "Native allocation call trees with balanced allocations can create a call tree from deallocation sites only", "MarkerChart renders the hoveredItem markers properly", "url handling tracks legacy thread information handles legacy thread hiding", "flame graph transform shortcuts with a selected node handles focus subtree", "Viewport dragging around will not scroll off to the right of the viewport bounds", "shared/BlobUrlLink can update with a new blob the object url", "actions/ProfileView changeNetworkSearchString filters multiple network markers", "app/KeyboardShortcut reverts to the previous active element", "url upgrading version 3: remove platform only option switches to the stack chart when given a timeline tab", "timeline/LocalTrack with a network track matches the snapshot of the network track", "ThreadActivityGraph with intersection observer will redraw after it becomes visible again", "Viewport mousewheel zooming using ctrl + mousewheel with a right margin cannot zoom out beyond the bounds", "\"focus-subtree\" transform on an inverted call tree can be filtered to a subtree", "actions/changeInvertCallstack on a normal call tree starts with a selectedCallNodePath", "ThreadActivityGraph matches the 2d canvas draw snapshot with CPU values with missing samples", "expandUrl returns an error when there is no match for this hash", "TrackBandwidth draws a dot on the graph", "TrackVisualProgress has a tooltip that matches the snapshot", "Derive markers from Gecko phase markers only nests markers of the same name", "ThreadActivityGraph will compute the percentage properly even though it is in a committed range with missing samples", "timeline/TrackNetwork selects the network marker when left clicking", "Viewport mousewheel zooming using ctrl + mousewheel with a left margin does not scroll the viewport right when the mouse is centered on the right.", "EmptyThreadIndicator empty buffer start indicator in range during and before", "TrackMemory matches the 2d canvas draw snapshot", "ProfileCallTreeView with JS Allocations can switch to JS allocations and back to timing", "app/MenuButtons deleting a profile displays the delete button if we have the uploaded data and some JWT token", "actions/ProfileView changeNetworkSearchString changes the search string", "strip-function-arguments should remove also the storage class", "SymbolStore should only request symbols from the symbol provider once per library", "actions/receive-profile retrieveProfileOrZipFromUrl fails in case the profile cannot be found after several tries", "process-profile processGeckoProfile should create one resource per used library", "process-profile DevTools profiles should process correctly", "SampleGraph ThreadSampleGraph clicking outside of any sample removes any selection", "flame graph transform shortcuts with both a selected and a right clicked node handles merge call node", "stack chart transform shortcuts with a right clicked node handles merge call node", "call node paths on implementation filter change starts with combined CallNodePaths", "native allocation processing should process native allocation markers into a native allocation table", "filterRawMarkerTableToRange filters nested tracing markers", "actions/receive-profile retrieveProfilesToCompare retrieves from-url profiles and puts them in the same view", "app/Details renders an initial view with the right panel for tab marker-table", "process-profile JS tracer does not have JS tracer information by default", "converting Google Chrome profile successfully imports a single CpuProfile, e.g. from node", "NetworkChartRowBar URL split splits properly a url with a long directory path", "Viewport mousewheel zooming using ctrl + mousewheel with both margins zooms the preview selection in a direction when the mouse is to the left", "changeSelectedCallNode switching between the call tree and the flame graph always selects a reasonable node", "snapshots of selectors/profile matches the last stored run of getProfile", "Viewport dragging around will not scroll off to the left of the viewport bounds", "TrackCustomMarker matches the component snapshot", "marker schema labels can parse a label with just a lookup value", "getTimingsForSidebar for an inverted tree returns good timings for a leaf node", "selectors/getThreadRange should use proper marker start/end times depending on the phase", "computeThreadCPURatio does not process the Windows values for 100% capping because they are not timing values", "\"collapse-recursion\" transform super advanced can collapse the B function", "actions/changeImplementationFilter is initially set to filter to all", "app/ServiceWorkerManager in the home, with the `none` datasource shows a notice when the SW is updated, and the user can close it", "timeline/TrackScreenshots renders a no images when zooming into a range before screenshots", "shared/ButtonWithPanel protecting against mounting expensive panels does not render the contents when closed", "TooltipMarker shows image of CompositorScreenshot markers", "snapshots of selectors/profile matches the last stored run of markerThreadSelectors.getTimelineOverviewMarkerIndexes", "getTimingsForSidebar in a non-inverted tree for profiles with JS nodes assign the right jit information to inherited native stacks", "selectors/getStackTimingByDepth computes unfiltered stack timing by depth", "UintArray encoding encodes correctly", "shared/ButtonWithPanel opens the panel when the button is clicked and does not close the panel by clicking inside the panel", "SampleGraph ThreadSampleGraph shows the correct tooltip when hovered", "timeline/TrackContextMenu when a local track is right clicked has the correct selectors into useful parts of the component", "deriveMarkersFromRawMarkerTable matches the snapshot", "timeline/LocalTrack with a thread track can select a thread by clicking the label", "app/DragAndDrop matches the snapshot with custom overlay", "Timeline multiple thread selection skips over hidden tracks", "symbolServerUrl will error when switching to an allowed but non-https host", "TooltipMarker renders properly redirect network markers for a Internal redirection", "jwt/decodeJwtBase64Url decodes base64url values", "actions/receive-profile retrieveProfileForRawUrl does not retrieve a profile for the datasource none", "CallTree transform shortcuts with a selected node handles focus subtree", "\"collapse-resource\" transform specific implementation can apply the transform to the selected CallNodePaths", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"merge-function\"", "calltree/ProfileCallTreeView procures an interesting selection, also when switching threads", "SampleTooltipContents renders the CPU usage properly in the areas where blur is applied", "committed ranges serialization serializes when rounding down the start", "PathSet implements .add", "flame graph transform shortcuts with both a selected and a right clicked node handles collapse direct recursion", "app/ServiceWorkerManager with the `from-browser` datasource shows a warning notice if updated before we were ready", "TimelineMarkers with intersection observer will not draw before the intersection observer", "fetchSource propagates network errors", "importing perf profile should import a perf profile", "getUsefulTabs shows only the call tree when a diffing track is selected", "TooltipMarker renders page information for pages with response status code", "MarkerTable IPC marker context menu item can switch to a local track", "URL serialization of the transform stack deserializes focus subtree transforms", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"drop-function\"", "Viewport dragging around will place the contents of a small viewport at the bottom of the bounding box", "Timeline multiple thread selection will still work on the activity graph when holding ctrl", "CPUGraph matches the 2d canvas draw snapshot", "getUsefulTabs shows the network chart when network markers are present in the thread", "arePathsEqual returns true for equal paths", "actions/changeShowUserTimings can change the view to show a summary", "converting Simpleperf trace successfully imports a simpleperf trace with task-clock", "ordering and hiding global tracks can isolate just the main thread of a process", "flame graph transform shortcuts with a selected node handles merge call node", "CallTree transform shortcuts with a selected node handles collapse function subtree", "origin annotation formats web origins correctly", "\"focus-category\" transform on a small call tree 2 category Graphics can be focused", "ordering and hiding local tracks will reselect a sibling thread index when a track is hidden 2", "Viewport mousewheel zooming using ctrl + mousewheel no margins zooms the preview selection equally when the mouse is centered", "UintArray encoding removes redundant leading zeros", "TimelineMarkers with intersection observer will not draw after the intersection observer if it is not intersecting", "committed ranges serializing and parsing supports negative start values", "traced timing computes traced timing based on the preview selection", "console-accessible values on the window object does not have the values initially", "getTimingsForSidebar for a diffing track computes the right breakdowns", "getLineTimings for getStackLineInfo passes a basic test", "ProfileName has a default name", "process-profile extensions metadata should be processed correctly", "selectors/getJsTracerTiming full stack-based view can generate sibling timing", "NetworkChartRowBar URL split splits properly a url without a filename and a long directory", "timeline/LocalTrack with a thread track will render a stub div if the track is hidden", "PathSet implements .forEach", "Native allocation call trees with balanced allocations can create a call tree from allocations only", "stack chart transform shortcuts with both a selected and a right clicked node handles drop function", "stack chart transform shortcuts with both a selected and a right clicked node handles focus-function", "NetworkChartRowBar phase calculations divides up the different phases of the request with subset of required information", "TooltipMarker renders properly normal network markers", "compare serializes profiles URL properly", "Native allocation call trees with unbalanced allocations can create a call tree from deallocations only", "MarkerTable selects a row when left clicking", "formatGigaBytes returns large values without fractional digits by default", "getTimingsForSidebar for an inverted tree returns good timings for a node present in several stacks without self time", "actions/receive-profile retrieveProfileFromBrowser can retrieve a profile from the browser as arraybuffer using web-channel", "bisectionRight returns 0 if all elements are greater than x", "actions/ProfileView selectTrack with a thread tracks can switch to a local track", "TooltipMarker renders page information for HTTP/3.0 pages in network markers", "formatGigaBytes can return values with gigabyte precision", "getAddressTimings for getStackAddressInfo passes a test with two files and recursion", "TooltipMarker renders page information for pages with request status", "call node paths on implementation filter change strips away the C++ functions when going from combined to JS", "TrackCustomMarker matches the 2d canvas draw snapshot", "timeline/TrackContextMenu global / local track visibility interplay will unhide the global track when unhiding one of its local tracks", "app/Details renders an initial view with the right panel for tab stack-chart", "\"filter-samples\" transform on a call tree filters to range of \"DOMEvent\" by looking at its searchable fields", "app/Details show the correct state for the sidebar open button", "\"collapse-recursion\" transform super advanced keeps the line number and address of the innermost frame", "TrackProcessCPU can draw a dot on both extremes of the graph", "mergeProfilesForDiffing function merges the various tables properly in the diffing profile", "UrlManager redirects from-file back to no data source", "actions/receive-profile retrieveProfileForRawUrl keeps the `from-url` value in the URL", "transform native deallocations is modified when performing a transform to the stacks", "StackChart matches the snapshot for empty reasons screen", "CallTree transform shortcuts with a selected node handles merge call node", "timeline/TrackContextMenu when a global track is right clicked isolates a screenshot track", "Viewport mousewheel zooming using ctrl + mousewheel with a left margin cannot zoom out beyond the bounds", "getDownloadRecipeForSourceFile finds the correct URLs for hg paths", "SampleTooltipContents renders the CPU usage only when outside of the activity graph is hovered", "profileName serializes the profileName in the URL", "app actions changeSelectedTab records an analytics event when changing tabs", "actions/ProfileView changeSelectedCallNode can change the call node", "CallTree transform shortcuts with both a selected and a right clicked node handles focus-category", "\"merge-function\" transform on a call tree function C can be merged into callers", "flame graph transform shortcuts with both a selected and a right clicked node handles focus-function", "getTimingsForSidebar in a non-inverted tree returns good timings for a node that has both children and self time", "expandUrl forwards errors", "flame graph transform shortcuts with a right clicked node handles collapse direct recursion", "actions/ProfileView changeRightClickedTrack changes the right clicked thread index", "calltree/ProfileCallTreeView navigation keys reacts properly to up/down navigation keys", "TooltipMarker renders page information for pages with multiple class of service flags", "\"filter-samples\" transform on a call tree filters to a non-existent marker name", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getTransformStack", "sanitizePII should sanitize the threads if they are provided", "EmptyThreadIndicator shutdown empty thread indicator is 100% on screen zoomed far into shutdown time", "selectors/getJsTracerTiming self time can generate some simple nested timing", "shared/ButtonWithPanel renders a button with a panel", "\"merge-function\" transform on a call tree starts as an unfiltered call tree", "actions/ProfileView updatePreviewSelection updates the profile selection", "MarkerChart persists the selected marker tooltips properly", "bisectionRightByStrKey throws TypeError if either low or high are outside the range of the array", "\"collapse-recursion\" transform incredibly advanced can collapse the B function", "TooltipMarker renders properly redirect network markers without additional redirection information", "CallTree transform shortcuts with a selected node ignores shortcuts with modifiers", "ProfileViewSelectors.getProcessesWithMemoryTrack knows when a profile has a memory track", "sanitizePII when sanitizing private browsing data removes markers coming from private browsing", "timeline type should use the cpu-category view when CPU usage is provided", "attemptToPublish updates with upload progress", "Network Chart/tooltip behavior changes the redux store when the mouse hovers the line", "fetchSource fetches files from local symbol servers", "\"focus-category\" transform on a tiny call tree starts as an unfiltered call tree", "actions/receive-profile _fetchProfile fetches a profile with incorrect content-type headers, but .json extension", "Derive markers from Gecko phase markers completes an unmatched IntervalStart marker", "process-profile processGeckoProfile should have a profile-wide libs property", "TrackEventDelay draws a dot that matches the snapshot", "ordering and hiding global tracks sorting of track types to ensure proper URL backwards compatibility creates stable track indexes over time", "app/Details renders an initial view with the right panel", "profile-data getCallNodeInfo starts with a fully unduplicated set stack frames", "category-info should infer the right categories for these example methods", "gecko profilerOverhead processing offsets the overhead timing for child processes", "actions/receive-profile viewProfile will hide threads with idle samples", "sanitizePII should sanitize extensions", "MarkerTable EmptyReasons shows reasons when all non-network markers have been filtered out", "app/ServiceWorkerManager automatic reloading reloads the application automatically if there is an error and there is a pending version", "findRoundMillisecondsValueGreaterOrEqualTo rounds values > 10s using round values in seconds, minutes, hours or days", "MarkerTable column resizing can resize a column, then move it back to its initial size", "getCheckedSharingOptions default filtering by channel does not filter with nightly-try", "reducer zipFileState will fail when trying to load an invalid profile", "console-accessible values on the window object totalMarkerDuration skips instant markers with null end times", "parseFileNameFromSymbolication returns absolute file paths unchanged", "console-accessible values on the window object adds values to the console", "StackSettings can change the implementation filter to JavaScript", "FlameGraph can be navigated with the keyboard", "transform native allocations is modified when performing a transform to the stacks", "calltree/CallNodeContextMenu clicking on the rest of the menu items Show the function in DevTools item shows up when there is a browser connection", "app/AppViewRouter renders an initial home", "MarkerChart changes the mouse time position when the mouse moves", "actions/receive-profile retrieveProfileFromBrowser can retrieve a profile from the browser as json using web-channel", "calltree/ZipFileTree contains a list of all the files", "calltree/CallNodeContextMenu clicking on the rest of the menu items Show the function in DevTools item does not show up when it is not a JS frame", "data-table-utils sortDataTable should sort this other data table", "SampleGraph with intersection observer will draw after the intersection observer if it is intersecting", "committed ranges serializing and parsing can parse the serialized values", "category-info should ignore known categories", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getCallTree", "FlameGraph shows a tooltip when hovering", "reducer zipFileState profileName handling prefers ProfileName if it is given in the URL", "TrackEventDelay draws a dot on the graph", "getCheckedSharingOptions default filtering by channel does not filter local builds", "attemptToPublish store profile information in indexeddb stores unsanitized profiles just fine", "app/ServiceWorkerManager with the `public` datasource shows a warning notice if the SW was updated before we were ready", "timeline/TrackContextMenu when a local track is right clicked can isolate the local track", "stack chart transform shortcuts with a right clicked node handles merge function", "timeline/GlobalTrack can select a thread by clicking the row", "actions/changeInvertCallstack on a normal call tree inverts the selectedCallNodePath", "CallTree transform shortcuts with a right clicked node handles drop function", "TrackMemory with intersection observer will draw after the intersection observer if it is intersecting", "ProfileCallTreeView/end-to-end can display a gecko profile without crashing", "url handling tracks legacy thread information handles legacy thread ordering", "attemptToPublish can handle upload errors", "unfiltered call tree CallTree methods getChildren() returns an array with the children indexes", "shortenUrl changes the requested url if is not the main URL", "Viewport keyboard navigation moves viewport down and up", "uploaded-profiles-db can delete profile information", "JS allocation call trees can use an implementation filter", "thread merging can use thread keys for transforms", "app/TabSelectorMenu should switch tabs properly", "Date mock can mock a date with a timestamp", "UintArray encoding decodes correctly", "actions/receive-profile retrieveProfileFromStore fails in case the profile cannot be found after several tries", "app/ProfileFilterNavigator renders ProfileFilterNavigator properly", "symbolServerUrl can be switch to a custom localhost server", "sanitizePII should not sanitize profiler overhead if its thread is not deleted", "flame graph transform shortcuts with a selected node handles collapse resource", "app/TabBar renders the TabBar and handles clicks properly", "flame graph transform shortcuts with a selected node handles merge function", "TooltipMarker renders page information for private pages in network markers", "event handlers for Firefox WebChannel events handles legacy ENABLE_MENU_BUTTON_DONE responses correctly", "fetchAssembly fetches assembly from the browser", "CallTree transform shortcuts with a right clicked node handles merge function", "attemptToPublish with zip files removes the zip viewer and only shows the profiler after upload", "stack chart transform shortcuts with both a selected and a right clicked node ignores shortcuts with modifiers", "last requested call tree summary strategy will use the default \"timing\" when an unknown value is received", "Marker schema filtering filters for getMarkerChartMarkerIndexes", "search strings serializes the call tree search strings in the URL", "timeline/TrackContextMenu when a local track is right clicked can toggle a local track by clicking it", "process-profile JS tracer processes JS tracer and offsets the timestamps", "TimelineMarkers displays context menus and still highlights other markers when hovering them", "ordering and hiding global tracks starts out with the initial sorting", "ordering and hiding local tracks can select a local track's thread", "app/MenuButtons Unchecks the Include Browsing Data checkbox in nightly when some private browsing data is in the profile", "search strings serializes the network search string in the URL", "committed ranges parsing deserializes when there is 1 range", "canonicalizeRangeSet unifies overlapping ranges", "flame graph transform shortcuts with a selected node ignores shortcuts with modifiers", "timeline/TrackContextMenu show all local tracks in a process by double clicking the global process item", "converting Google Chrome profile successfully imports a chunked profile (one that uses Profile + ProfileChunk trace events)", "JS allocation call trees will apply a preview selection", "TrackMemory can create a tooltip", "Viewport dragging around will place the contents of a small viewport at the top of the bounding box", "right clicked marker info should be empty on store creation", "right clicked marker info resets right clicked marker when context menu is hidden", "formatMegaBytes can return values with megabyte precision", "\"collapse-direct-recursion\" transform combined implementation keeps the line number and address of the innermost frame", "\"filter-samples\" transform on a call tree filters to range of \"Log\" by looking at its searchable fields", "stack chart transform shortcuts with a right clicked node handles collapse recursion", "Viewport scrolling up and down scrolls the viewport down using the mousewheel", "timeline/TrackScreenshots renders a screenshot images when zooming into a range without a screenshot start time actually in the range", "url upgrading version 4: Add relevantForJs frames to JS callNodePaths can upgrade the callNodePath in the second branch of the call tree with relevantForJs frame first", " can render the permalink button", "timeline/LocalTrack with a thread track can select a thread by clicking the row", "getLineTimings for getStackLineInfoForCallNode passes a test with an inverted thread", "thread merging can merge threads when multiple threads are selected", "selectors/getJsTracerTiming self time can \"drain off\" prefixes the first if branch of the algorithm", "Timeline multiple thread selection forgets a local clicked track that is hidden later", "getUsefulTabs shows the js tracer when it is available in a thread", "ListOfPublishedProfiles renaming profiles can rename stored profiles", "timeline/TrackContextMenu when a global track is right clicked matches the snapshot of a global track", "CallTree transform shortcuts with both a selected and a right clicked node handles drop function", "expandUrl returns the long url returned by the API", "FlameGraph EmptyReasons shows reasons when samples are not in the committed range", "counter selectors can get the counters", "stack chart transform shortcuts with both a selected and a right clicked node handles focus-category", "CallTree transform shortcuts with a right clicked node handles focus-function", "marker schema labels can mix and match lookups", "calltree/ZipFileTree clicking on a profile link starts out without any path in the zip file", "actions/receive-profile retrieveProfileForRawUrl retrieves profile from a `public` data source and loads it", "calltree/ProfileCallTreeView TransformNavigator renders with multiple transforms applied", "url upgrading version 5: implement ranges differently does not error when there is no range", "app/KeyboardShortcut matches the snapshot when open", "app actions show404 tracks when the route is not found", "Viewport provides a viewport", "console-accessible values on the window object totalMarkerDuration returns 0 for empty array", "calltree/ProfileCallTreeView hides the context menu by left clicking somewhere else", "app/MenuButtons with no extra info there is no more info button", "getJankMarkersForHeader will create a jank instance with eventDelay values", "\"collapse-recursion\" transform basic starts as an unfiltered call tree", "sanitizePII should sanitize the sanitized-string markers", "JS allocation call trees can apply a call tree transform", "flame graph transform shortcuts with both a selected and a right clicked node ignores shortcuts with modifiers", "app/AppViewRouter renders a uploaded-recordings page when navigating to /uploaded-recordings", "console-accessible values on the window object totalMarkerDuration returns 0 and logs error for non-array input", "formatMegaBytes can return values with byte precision", "ThreadActivityGraph when clicking outside of the graph, this doesn't select the call tree panel", "flame graph transform shortcuts with a selected node handles focus-category", "actions/receive-profile retrieveProfileFromFile can load gzipped json", "timeline/TrackContextMenu hide all tracks by type hides a local track", "actions/receive-profile viewProfile can take a profile and view it", "remove-template-information should remove template information", "sanitizePII should sanitize the FileIO marker paths", "computeThreadCPURatio sets the first value to zero and turns null values into 100% CPU", "getTimingsForSidebar in a non-inverted tree for profiles with JS nodes returns good timings for a JS node with various implementations", "uploaded-recordings unserializes uploaded-recordings URLs", "timeline/TrackNetwork displays a context menu when right clicking, and hides it when clicking in blank space", "js allocation processing should process JS allocation markers into a JS allocation table", "timeline/LocalTrack with an IPC track correctly renders the IPC label", "implementation parsing deserializes when there is no implementation value", "getAddressTimings for getStackAddressInfoForCallNode passes a basic test with recursion", "call node paths on implementation filter change can go from JS to C++ views", "\"collapse-recursion\" transform basic keeps the line number and address of the innermost frame", "actions/ProfileView selectTrack when the loaded panel is not the call tree moves to the call tree when then initial tab is the network chart", "TrackBandwidth has a tooltip that has all the necessary information", "actions/ProfileView changeMarkersSearchString filters the markers by a potential data payload of type Log filters the the payload name property", "computeThreadCPURatio processes macOS timing values and caps them to 100% if they are more than the interval values", "utils/string removeURLs should remove moz-extension URLs", "app/NonLocalizedErrorBoundary shows the component children when there is no error", "actions/receive-profile _fetchProfile fallback behavior if a completely unknown file is passed in", "TooltipMarker renders the page information for network markers", "formatMegaBytes returns large values without fractional digits by default", "StackChart can select a call node when clicking the chart", "app/MenuButtons matches the snapshot", "calltree/ProfileCallTreeView EmptyReasons shows reasons for being out of range of a threads samples", "parseFileNameFromSymbolication parses git paths", "Viewport scrolling up and down cannot scroll past the bottom of the viewport", "timeline/TrackNetwork matches the 2d context snapshot", "timeline/TrackContextMenu hide all tracks by type on click a global track", "app/Home renders a button to enable the popup in Firefox", "expanded and selected CallNodePaths on inverted trees can update call node references for focusing a subtree", "TrackMemory has a tooltip that matches the snapshot", "stack chart transform shortcuts with a selected node handles collapse function subtree", "MarkerTable IPC marker context menu item can switch to another global track", "actions/receive-profile viewProfile will not hide audio tracks if they have at least one sample", "selectors/getJsTracerTiming match function names works on the sampled data", "app/AppViewRouter renders the profile view", "JS allocation call trees can create a call tree from JS allocations", "timeline/LocalTrack with a network track has correctly renders the network label", "NetworkChartRowBar URL split splits properly a url without a filename", "ProfileCallTreeView with unbalanced native allocations does not have the retained memory option", "calltree/ProfileCallTreeView displays a context menu when right clicking", "actions/receive-profile retrieveProfileForRawUrl does not retrieve a profile for the datasource from-file", "url handling tracks global tracks will not accept invalid tracks in the thread order", "FlameGraph displays a context menu when rightclicking", "app/DragAndDrop responds to dragging", "bisectionLeft throws TypeError if either low or high are outside the range of the array", "profile upload returns a proper error when encoutnering a network error", "flame graph transform shortcuts with a selected node handles drop function", "ProfileCallTreeView with unbalanced native allocations can switch to native allocations and back to timing", "getMarkerSchema combines front-end and Gecko marker schema", "PathSet implements .clear", "calltree/ZipFileTree clicking on a profile link kicks off the profile loading process when clicked", "CallTree transform shortcuts with both a selected and a right clicked node handles merge function", "TrackPower has a tooltip that matches the snapshot", "unfiltered call tree getCallNodeIndexFromPath finds stack that ends in H", "formatMegaBytes can return values with kilobyte precision", "actions/ProfileView selectTrack with a network track can switch back to the thread, which remembers the last viewed panel", "symbolication AddressLocator should return no library when outside or in holes", "ordering and hiding local tracks can count hidden local tracks", "Native allocation call trees can search the allocations", "actions/receive-profile viewProfile will not hide non-idle content threads", "UrlManager sets the data source to from-browser when coming from the legacy URL /from-addon even when there are double slashes", "getTimingsForSidebar for an inverted tree returns good timings for preview selections", "selected and expanded zip files can select a zip file", "meta selector can get meta", "app/NonLocalizedErrorBoundary matches the snapshot", "CallTreeSidebar matches the snapshots when displaying data about the currently selected node in an inverted tree", "StackChart matches the snapshot", "Viewport mousewheel zooming using ctrl + mousewheel with both margins zooms the preview selection in a direction when the mouse is to the right", "UrlManager sets up the URL", "selectors/getCallNodeMaxDepthPlusOneForFlameGraph returns zero if there are no samples", "NetworkChartRowBar URL split returns null with an invalid url", "reducer zipFileState profileName handling computes a profile name from the loaded file", "\"collapse-direct-recursion\" transform filtered implementation can collapse the B function", "converting ART trace successfully imports a non-streaming ART trace", "app/ServiceWorkerManager with the `public` datasource doesn't show a notice until a profile is fully loaded", "getTimingsForSidebar in a non-inverted tree returns good timings for preview selections", "CPUGraph matches the component snapshot", "calltree/ProfileCallTreeView computes a width for a call tree of a really deep stack", "parseFileNameFromSymbolication parses s3 paths", "converting Google Chrome profile successfully imports a non-chunked profile (one that uses a CpuProfile trace event)", "CallTree transform shortcuts with both a selected and a right clicked node handles focus subtree", "extract functions and resource from location strings extracts the information for all different types of locations", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getSelectedCallNodeIndex", "formatKiloBytes can return values with byte precision", "app/BeforeUnloadManager Prevents default beforeunload behaviour", "ThreadActivityGraph redraws on resize", "EmptyThreadIndicator empty buffer start indicator is not shown when the viewport isn\u2019t in range before", "uploaded-recordings serializes uploaded-recordings URLs", "actions/updatePreviewSelection can update the selection with new values", "app/CompareHome starts loading profiles after user action", "timeline/LocalTrack with a memory track matches the snapshot of the memory track", "selectedThread selects the right threads (multi selection) when receiving a profile from web", "ordering and hiding global tracks keeps the selected local track when isolating a global track", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getRangeAndTransformFilteredThread", "selectors/getJsTracerTiming full stack-based view can generate some simple nested timing", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getPreviewFilteredThread", "bisectionLeft returns index of the first number greater than x or the first occurence of x, occuring after low", "bisectionRightByKey returns index of the first element whose key is greater than x, between low and high", "timeline/GlobalTrack can select a thread by clicking the label", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"collapse-function-subtree\"", "app/MenuButtons matches the snapshot for the menu buttons and the opened panel for an already uploaded profile", "MarkerTable displays a context menu when right clicking", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getCallNodeInfo", "utils/string removeURLs should remove the query strings of about URLs", "URL persistence of transform stacks for a combined thread (multi-thread selection) persists the transform for the combined thread of 0+1 if threads 0 and 1 are selected", "getTimingsForSidebar for an inverted tree for profiles with JS nodes returns good timings for a root native non-js node", "actions/receive-profile retrieveProfileFromBrowser gets the favicons for the received profile using webchannel", "deriveMarkersFromRawMarkerTable should fold the two reflow markers into one marker", "snapshots of selectors/profile matches the last stored run of getThreadNames", "actions/receive-profile viewProfile won't hide any tracks in a profile resulting from a compare operation", "actions/receive-profile retrieveProfileFromFile can load json with an empty mime type", "StackChart matches the snapshot a simple chart render", "url upgrading version 4: Add relevantForJs frames to JS callNodePaths can upgrade a simple stack with one relevantForJs frame in the middle", "app/ServiceWorkerManager with the `public` datasource shows a notice when the SW is updated", "attemptToPublish with zip files can revert viewing the original zip file state after publishing", "\"collapse-recursion\" transform super advanced can apply the transform to the selected CallNodePaths", "unfiltered call tree ordered rows of call node indexes for flame graph returns ordered rows", "utils/string removeURLs should remove the URL with file extension and multiple querystrings successfully", "\"filter-samples\" transform on a call tree starts as an unfiltered call tree", "MarkerChart matches the snapshots for the component and draw log", "URL persistence of bottom box (source view and assembly view) only opens the assembly view on reload if it was open before", "timeline/GlobalTrack will not render markers to the timeline-overview when showMarkersInTimeline is not set", "symbolServerUrl defaults to the Mozilla symbol server", "Viewport mousewheel zooming using ctrl + mousewheel with both margins zooms the preview selection equally when the mouse is centered", "implementation parsing deserializes unknown values", "utils/string removeURLs should not remove basic about URLs", "transform js allocations is modified when performing a transform to the stacks", "bisectionRightByStrKey returns index of the first element whose key is greater than x, between low and high", "uploaded-profiles-db retrieves a sorted list", "app/MenuButtons deleting a profile dismissing the panel will move back to the profile information when opened again", "mergeThreads function merges the various tables for 2 threads properly", "timeline/TrackThread matches the 2d canvas draw snapshot", "app/MenuButtons shows the Include preference values checkbox when a PreferenceRead marker is in the profile", "SampleGraph with intersection observer will redraw after it becomes visible again", "FlameGraph shows a tooltip with the resource information with categories", "app/TabSelectorMenu should render sanitized page urls correctly", "Derive markers from Gecko phase markers creates an interval marker", "unfiltered call tree CallTree methods getAllDescendants() returns a set with the descendant indexes", "CallTree transform shortcuts with a selected node handles focus-category", "mergeProfilesForDiffing function merges the nativeSymbols tables correctly", "\"drop-function\" transform on a call tree function C can be merged into callers", "stack chart transform shortcuts with a right clicked node ignores shortcuts with modifiers", "StackSettings can change the search", "calltree/CallNodeContextMenu clicking on the rest of the menu items Show the function in DevTools item does not show up when the JS is self hosted", "getDownloadRecipeForSourceFile finds no URL for URLs", "CallTree transform shortcuts with a selected node handles focus-function", "profile-data createCallNodeTableAndFixupSamples should create one callNode per original stack", "traced timing computes traced timing for an inverted tree", "symbolication AddressLocator should return correct relative addresses for large absolute addresses", "attemptToPublish store profile information in indexeddb stores the information for the right upload when the user aborts and uploads again", "VerticalIndicators creates the vertical indicators", "stack chart transform shortcuts with a selected node handles focus-category", "selectors/getCallNodeMaxDepthPlusOneForFlameGraph calculates the max call node depth", "ProfileName can edit the name", "snapshots of selectors/profile matches the last stored run of selectedNodeSelectors.getLib", "actions/ProfileView changeExpandedCallNodes changes the expanded call nodes", "upgrading gecko profiles should upgrade gecko-1.json all the way to the current version", "process-profile processGeckoProfile should shift the content process by 1 second", "findRoundMillisecondsValueGreaterOrEqualTo rounds values above 2 days using base 10 round value", "jwt/isValidJwtToken returns false for invalid base64url value: a+hD.b1sc.cSre", "UrlManager fetches profile and sets the phase to done when everything works", "visual metrics selectors can get visual progress", "utils/string removeURLs should remove the URL inside parentheses successfully", "symbolServerUrl will error when switching to an unknown host", "FlameGraph EmptyReasons matches the snapshot when a profile has no samples", "search strings properly handles the call tree search string stacks with 1 item", "ordering and hiding global tracks ordering by activity orders process tracks by activity score while keeping parent process first", "event handlers for Firefox WebChannel events can test if the menu button is enabled", "doSymbolicateProfile can symbolicate a profile with a partial symbol table and re-symbolicate it with a complete symbol table", "ordering and hiding local tracks will reselect a sibling thread index when a track is hidden", "url upgrading version 7: change default timeline type add an explicit category from the url", "utils/gz compresses and decompresses properly", "formatBytes returns 0 without fractional digits when called with 0", "bottom box stores multiple native symbols if the chosen call node has multiple native symbols", "snapshots of selectors/profile matches the last stored run of getRightClickedTrack", "Timeline TimelineInitialSettings displays the normal visible threads and orders them alphabetically if setting is not present", "timeline/TrackContextMenu when a global track is right clicked can hide the process", "sanitizePII should sanitize counters if they are provided", "WindowTitle shows the correct title for the compare view", "app/MenuButtons matches the snapshot with device information", "SampleGraph with intersection observer will not draw before the intersection observer", "formatGigaBytes returns 0 without fractional digits when called with 0", "actions/ProfileView popCommittedRanges pops a committed range and sets the selection", "formatKiloBytes returns values with 2 fractional digits by default", "bisectionLeft returns array length if x is greater than all elements", "sanitizePII should not sanitize all the preference values inside preference read markers", "TrackMemory with intersection observer will not draw after the intersection observer if it is not intersecting", "formatKiloBytes returns 0 without fractional digits when called with 0", "snapshots of selectors/profile matches the last stored run of getThreads", "selectedThread selects a default thread when a wrong thread has been requested", "upgrading gecko profiles should upgrade gecko-2.json all the way to the current version", "TrackEventDelay can draw a dot on both extremes of the graph", "UrlManager allows navigating back and forward when moving between content pages", "sanitizePII should sanitize profiler overhead if its thread is deleted", "getLineTimings for getStackLineInfo passes a test with two files and recursion", "app/MenuButtons can publish, cancel, and then publish again", "stack chart transform shortcuts with a right clicked node handles collapse direct recursion", "calltree/CallNodeContextMenu clicking on the rest of the menu items Show the function in DevTools item does not show up when there is no tabId", "sanitizePII should sanitize extension ids inside text markers", "timeline/TrackContextMenu when a local track is right clicked can hide the DOM worker thread", "Timeline multiple thread selection is possible to mix both ctrl and shift modifiers", "actions/ProfileView commitRangeAndUnsetSelection commits a range and unsets a selection", "calltree/CallNodeContextMenu clicking on call tree transforms adds a transform for \"collapse-direct-recursion\"", "CallTree transform shortcuts with both a selected and a right clicked node handles merge call node", "TrackEventDelay matches the component snapshot when event delay tracks are disabled", "traced timing computes traced timing", "attemptToPublish store profile information in indexeddb stores properly sanitized profiles", "actions/receive-profile viewProfile will not hide the only global track", "WindowTitle shows basic window title", "Viewport dragging around will not drag beyond the bottom of the window", "timeline/TrackScreenshots displays a smaller screenshot when preview selecting, and doesn't change it when clicking if a selection is already present", "TrackCustomMarker has a tooltip that matches the snapshot", "Derive markers from Gecko phase markers completes an unmatched IntervalEnd marker", "selectors/getJsTracerTiming self time has empty JS tracer timing if no events are in the js tracer table", "jwt/isValidJwtToken returns false for invalid base64url value: |ODe.iOIZ.X;oD", "string-table should return the right strings", "sanitizePII should not sanitize the eTLD+1 field if urls are not supposed to be sanitized", "app/AppViewRouter does not try to retrieve a profile when moving from from-browser to public", "TrackProcessCPU matches the component snapshot", "MarkerTable renders some basic markers and updates when needed", "ThreadActivityGraph matches the 2d canvas draw snapshot with only one CPU usage value", "getAddressTimings for getStackAddressInfoForCallNode passes a test where a function is present in two different native symbols", "sanitizePII should sanitize all the URLs inside string table", "deriveMarkersFromRawMarkerTable should create a marker for the marker UserTiming", "UrlManager allows navigating back and forward when changing view options", "Timeline multiple thread selection selects also the related thread when a related track is first clicked", "CallTree transform shortcuts with both a selected and a right clicked node handles collapse function subtree", "process-profile processGeckoProfile nudges return addresses but not sampled instruction pointer values", "timeline/GlobalTrack will render a stub div if the track is hidden", "flame graph transform shortcuts with a right clicked node handles focus-category", "filterRawMarkerTableToRangeWithMarkersToDelete filters generic markers with markerToDelete", "flame graph transform shortcuts with a right clicked node handles collapse resource", "Native allocation call trees can use an implementation filter", "ListOfPublishedProfiles profile deletion renders a generic message when the final profile on the list has been deleted", "converting Linux perf profile should import a perf profile of graphviz with a header", "implementation serializing can serialize the value \"js\"", "getStackAddressInfo computes results for all stacks", "getJankMarkersForHeader will show BHR markers when there are no Jank markers present", "actions/receive-profile _fetchProfile fetches a zipped profile with correct content-type headers", "profileName reflects in the state from URL", "filter-by-implementation will return only JS samples if filtering to \"js\"", "actions/receive-profile viewProfile with threadCPUDelta will hide a thread when the relative CPU percentage is below 5%", "selectors/getMarkerChartTimingAndBuckets markers of the different names puts them in different rows", "formatMegaBytes returns values with 2 fractional digits by default", "Timeline multiple thread selection can select one thread from many", "app/MenuButtons Unchecks the Include Browsing Data checkbox in release when some private browsing data is in the profile", "VerticalIndicators displays a context menu when right clicking", "untar lists all files in example tar", "app/ServiceWorkerManager with the `from-browser` datasource doesn't show a notice if updated after we were fully loaded", "timeline/TrackContextMenu when a global track is right clicked has the correct selectors into useful parts of the component", "getRemoveProfileInformation should bail out early when there is no preference marker in the profile", "Timeline TimelineSettingsHiddenTracks resets \"rightClickedTrack\" state when clicked", "NetworkChartRowBar phase calculations divides the phases when only the end marker is present", "TooltipMarker renders properly redirect network markers for an internal redirection from a HSTS header", "actions/receive-profile retrieveProfilesToCompare filters samples and markers, according to the URL", "Date mock automatic mock restore initializes mocks", "actions/receive-profile retrieveProfileFromFile can load gzipped json with an empty mime type", "timeline/TrackContextMenu show all matching tracks shows a local track", "remove-template-information should not remove java initializer functions", "ListOfPublishedProfiles still displays the link to all recordings when there is 3 profiles or less", "timeline type should use the category view when cpu is not provided", "BottomBox should show the source view when a line in the tree view is double-clicked", "getUsefulTabs works when the first sample is null", "Timeline multiple thread selection can select a range of tracks with shift clicking", "SampleTooltipContents renders the sample with ns CPU usage information properly", "console-accessible values on the window object logs a friendly message", "stack chart transform shortcuts with both a selected and a right clicked node handles merge function", "actions/ProfileView changeSelectedThread can set and change the selected thread", "\"collapse-recursion\" transform unbelievably advanced starts as an unfiltered call tree", "can hide the footer links", "marker schema labels can parse very simple labels", "TrackPower draws a dot on the graph", "CallTree transform shortcuts with a selected node handles drop function", "NetworkChartRowBar phase calculations renders 2 bars for a network marker with a preconnect part", "StackChart can display the source view when pressing enter on the chart", "actions/receive-profile retrieveProfileForRawUrl retrieves profile from a `from-url` data source and loads it", "snapshots of selectors/profile matches the last stored run of selectedThreadSelector.getFilteredCallNodeMaxDepthPlusOne", "threadCPUDelta processing keeps threadCPUDelta data when the array contains at least one non-null value", "fetchAssembly fetches from symbol server", "shared/BlobUrlLink revokes the object url", "TrackCustomMarker with intersection observer will draw after the intersection observer if it is intersecting", "bisectionRight returns index of the first number greater than x, occuring after low", "ProfileName will use a url-provided profile name", "utils/string removeFilePath should remove Unix-like paths", "stack chart transform shortcuts with both a selected and a right clicked node handles collapse resource", "right clicked call node info should be empty on store creation", "PathSet implements iterable, .values, .entries", "app/MenuButtons matches the snapshot for the opened panel for a nightly profile", "stack chart transform shortcuts with a selected node handles drop function", "SampleGraph matches the component snapshot", "jsTracerFixed fixes overlapping structures, cutting off the end", "actions/icons Requesting an existing icon will populate the local cache", "\"collapse-direct-recursion\" transform combined implementation can apply the transform to the selected CallNodePaths", "category-info should return the majority category, 2 mozilla vs 1 arttracetest", "attemptToPublish works when the server returns a bare hash instead of a JWT token", "app/MenuButtons Does display a link for the build if there is a URL", "snapshots of selectors/profile matches the last stored run of selectedNodeSelectors.getTimingsForSidebar", "CallTreeSidebar matches the snapshots when displaying bytes data", "marker schema labels parseErrors errors if looking up into a part of the marker that does not exist", "ordering and hiding local tracks can count hidden global tracks and their hidden local tracks", "filterRawMarkerTableToRange filters network markers based on their ids", "WindowTitle shows the public annotation without startTime in the window title", "symbolication AddressLocator should return the second library for addresses inside the second library", "getTimingsForSidebar in a non-inverted tree for profiles with JS nodes returns good timings for a native node inheriting the JS category with some self time", "URL serialization of the transform stack re-serializes the focus subtree transforms", "URL persistence of bottom box (source view and assembly view) persists the source file shown in the source view to the URL", "TrackPower matches the 2d canvas draw snapshot", "fetchSource reports all errors if everything fails", "app/MenuButtons does not show the Include Browsing Data checkbox when no private browsing data is in the profile", "SampleTooltipContents renders the sample with \"variable CPU cycles\" CPU usage information properly", "Timeline multiple thread selection will select a thread through enter and spacebar keypresses for local tracks", "\"collapse-recursion\" transform basic can apply the transform to the selected CallNodePaths", "uploaded-profiles-db retrieves individual profile information", "flame graph transform shortcuts with both a selected and a right clicked node handles merge function", "Viewport dragging around can click and drag down", "EmptyThreadIndicator startup empty thread indicator is not shown when the viewport isn\u2019t in range", "counter selectors can get the counter pid", "formatGigaBytes can return values with megabyte precision", "sanitizePII should sanitize counters if its thread is deleted", "TrackProcessCPU can create a tooltip", "get-function-name should get the function name", "visualMetrics processing does not add markers to the parent process if metric timestamps are null", "stack chart transform shortcuts with both a selected and a right clicked node handles collapse recursion", "MarkerChart context menus allows selecting markers and highlights them", "app actions isSidebarOpen has certain sidebars open by default", "app/LocalizedErrorBoundary matches the snapshot", "mergeThreads function merges the various tables for more than 2 threads properly", "symbolServerUrl will allow a a subdirectory path on an allowed https host", "actions/ProfileView focusCallTree updates the focus call tree generation", "ordering and hiding local tracks can isolate a local track", "getFriendlyThreadName uses names based on GeckoMain processTypes when there are no processNames", "timeline/TrackNetwork matches the component snapshot", "implementation parsing deserializes known value cpp", "actions/icons Requesting a non-existing image will not populate the local cache", "funcHasDirectRecursiveCall and funcHasRecursiveCall funcHasRecursiveCall correctly identifies directly recursive functions", "Derive markers from Gecko phase markers matches an IntervalStart and IntervalEnd marker", "Native allocation call trees will apply a committed range selection", "\"collapse-recursion\" transform super advanced starts as an unfiltered call tree", "url upgrading version 5: implement ranges differently is permissive with invalid input", "SymbolStore should should report the right errors", "process-profile processGeckoProfile should have threads that are objects of the right shape", "symbolicator-cli tool is symbolicating a trace correctly", "committed ranges serialization serializes when there is a small range", "reducer zipFileState can compute a ZipFileTable", "upgrading processed profiles should upgrade processed-2.json all the way to the current version", "\"collapse-resource\" transform combined implementation can apply the transform to the selected CallNodePaths", "deriveMarkersFromRawMarkerTable should handle arbitrary tracing markers correctly", "remove-template-information should not remove