tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

MediaSessionTestUtils.js (852B)


      1 const gMediaSessionActions = [
      2  "play",
      3  "pause",
      4  "seekbackward",
      5  "seekforward",
      6  "previoustrack",
      7  "nexttrack",
      8  "skipad",
      9  "seekto",
     10  "stop",
     11 ];
     12 
     13 // gCommands and gResults are used in `test_active_mediasession_within_page.html`
     14 const gCommands = {
     15  createMainFrameSession: "create-main-frame-session",
     16  createChildFrameSession: "create-child-frame-session",
     17  destroyChildFrameSessions: "destroy-child-frame-sessions",
     18  destroyActiveChildFrameSession: "destroy-active-child-frame-session",
     19  destroyInactiveChildFrameSession: "destroy-inactive-child-frame-session",
     20 };
     21 
     22 const gResults = {
     23  mainFrameSession: "main-frame-session",
     24  childFrameSession: "child-session-unchanged",
     25  childFrameSessionUpdated: "child-session-changed",
     26 };
     27 
     28 function nextWindowMessage() {
     29  return new Promise(r => (window.onmessage = event => r(event)));
     30 }