test: prove the frame lifecycle fixes against the real extension

The evidence for the frame-observation fixes was a reimplementation of the
logic measured in a browser console, not the shipped code. Two extension
specs now cover the observable behaviour end to end: a player frame that
swaps its document, and the same one level deeper.

The nested case fails against the pre-fix content.js and passes now. The
top-level case already passed before the fix, so that fix removed dead
observer registrations without changing what a user could see; recorded
here so the distinction is not lost.

Also adds bench-finder.mjs, which measures the extracted shipped finder
instead of a transcription of it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
KoalaDev
2026-08-14 07:53:45 +02:00
parent 66971150c7
commit ef1fdc89c3
8 changed files with 177 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ import { buildVideoFinderScript } from './helpers/content-source.mjs';
const SCENARIOS = [
{ page: 'simple-player.html', expected: 'player', what: 'the only visible player' },
{ page: 'iframe-player.html', expected: 'framed-player', what: 'a player inside a same-origin frame' },
{ page: 'nested-frame.html', expected: 'framed-player', what: 'a player two frame levels down' },
{ page: 'shadow-player.html', expected: 'shadow-player', what: 'a player inside a shadow root over a light-DOM teaser' },
{ page: 'muted-player.html', expected: 'player', what: 'the only player even when muted' },
{ page: 'hidden-preload.html', expected: 'player', what: 'the visible player over a hidden higher-resolution preload' },